Class ByteBufferExpander
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.wal.ByteBufferExpander
-
- All Implemented Interfaces:
AutoCloseable
public class ByteBufferExpander extends Object implements AutoCloseable
ByteBuffer wrapper for dynamically expand buffer size.
-
-
Constructor Summary
Constructors Constructor Description ByteBufferExpander(int initSize, ByteOrder order)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBufferbuffer()Current byte buffer.voidclose()ByteBufferexpand(int size)Expands current byte buffer to the requested size.
-
-
-
Constructor Detail
-
ByteBufferExpander
public ByteBufferExpander(int initSize, ByteOrder order)- Parameters:
initSize- Initial size.order- Byte order.
-
-
Method Detail
-
buffer
public ByteBuffer buffer()
Current byte buffer.- Returns:
- Current byteBuffer.
-
expand
public ByteBuffer expand(int size)
Expands current byte buffer to the requested size.- Returns:
- ByteBuffer with requested size.
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable
-
-