public class WeavePoolBasedByteBufferProvider extends Object implements org.mule.runtime.api.memory.provider.ByteBufferProvider<ByteBuffer>
ByteBufferProvider implementation that can be used to retrieve direct or heap
ByteBuffer's based on a pool that saves released DirectByteBuffers to be reused.
Based on DataWeave Implementation.| Modifier and Type | Class and Description |
|---|---|
protected class |
WeavePoolBasedByteBufferProvider.WeaveByteBufferPool
BytBufferPool that saves released DirectByteBuffers to be reused.
|
| Modifier | Constructor and Description |
|---|---|
protected |
WeavePoolBasedByteBufferProvider(String name,
int capacity,
int maxSize,
org.mule.runtime.api.profiling.ProfilingService profilingService) |
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
allocate(int size) |
ByteBuffer |
allocateAtLeast(int size)
Not used by DataWeave.
|
void |
dispose() |
byte[] |
getByteArray(int size) |
ByteBuffer |
reallocate(ByteBuffer oldBuffer,
int newSize)
Not used by DataWeave.
|
void |
release(ByteBuffer buffer) |
protected WeavePoolBasedByteBufferProvider(String name, int capacity, int maxSize, org.mule.runtime.api.profiling.ProfilingService profilingService)
public ByteBuffer allocate(int size)
allocate in interface org.mule.runtime.api.memory.provider.ByteBufferProvider<ByteBuffer>public void release(ByteBuffer buffer)
release in interface org.mule.runtime.api.memory.provider.ByteBufferProvider<ByteBuffer>public byte[] getByteArray(int size)
getByteArray in interface org.mule.runtime.api.memory.provider.ByteBufferProvider<ByteBuffer>public ByteBuffer allocateAtLeast(int size)
allocateAtLeast in interface org.mule.runtime.api.memory.provider.ByteBufferProvider<ByteBuffer>public ByteBuffer reallocate(ByteBuffer oldBuffer, int newSize)
reallocate in interface org.mule.runtime.api.memory.provider.ByteBufferProvider<ByteBuffer>public void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposabledispose in interface org.mule.runtime.api.memory.provider.ByteBufferProvider<ByteBuffer>Copyright © 2003–2022 MuleSoft, Inc.. All rights reserved.