test_class.declarator: random
test_class.original_string: Random random;
test_class.type: Random
test_class.var_name: random
test_class.declarator: buffer = new OffHeapByteBuffer(0, 1024 * 1024 * 10)
test_class.original_string: OffHeapByteBuffer buffer = new OffHeapByteBuffer(0, 1024 * 1024 * 10);
test_class.type: OffHeapByteBuffer
test_class.var_name: buffer
test_class.file: imcache-offheap/src/test/java/com/cetsoft/imcache/offheap/bytebuffer/OffHeapByteBufferTest.java
test_class.identifier: OffHeapByteBufferTest
test_case.body: @Test
    public void remove() {
      int size = 100;
      final long expiry = System.currentTimeMillis();
      byte[] expectedBytes = new byte[size];
      random.nextBytes(expectedBytes);
      Pointer pointer = buffer.store(expectedBytes, expiry);
      byte[] actualBytes = buffer.remove(pointer);
      assertArrayEquals(expectedBytes, actualBytes);
    }
test_case.class_method_signature: OffHeapByteBufferTest.remove()
test_case.full_signature: @Test public void remove()
test_case.identifier: remove
test_case.invocations: currentTimeMillis nextBytes store remove assertArrayEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void remove()
focal_class.declarator: DEFAULT_CONCURRENCY_LEVEL = 4
focal_class.modifier: public final static
focal_class.original_string: public final static int DEFAULT_CONCURRENCY_LEVEL = 4;
focal_class.type: int
focal_class.var_name: DEFAULT_CONCURRENCY_LEVEL
focal_class.declarator: POINTER_SIZE = 5
focal_class.modifier: private final static
focal_class.original_string: private final static int POINTER_SIZE = 5;
focal_class.type: int
focal_class.var_name: POINTER_SIZE
focal_class.declarator: USED = 1
focal_class.modifier: private final static
focal_class.original_string: private final static byte USED = 1;
focal_class.type: byte
focal_class.var_name: USED
focal_class.declarator: FREE = 0
focal_class.modifier: private final static
focal_class.original_string: private final static byte FREE = 0;
focal_class.type: byte
focal_class.var_name: FREE
focal_class.declarator: DIRTY = -1
focal_class.modifier: private final static
focal_class.original_string: private final static byte DIRTY = -1;
focal_class.type: byte
focal_class.var_name: DIRTY
focal_class.declarator: directByteBuffer
focal_class.modifier: private final
focal_class.original_string: private final DirectByteBuffer directByteBuffer;
focal_class.type: DirectByteBuffer
focal_class.var_name: directByteBuffer
focal_class.declarator: readWriteLock
focal_class.modifier: private final
focal_class.original_string: private final StripedReadWriteLock readWriteLock;
focal_class.type: StripedReadWriteLock
focal_class.var_name: readWriteLock
focal_class.declarator: offset = new AtomicInteger(0)
focal_class.modifier: private final
focal_class.original_string: private final AtomicInteger offset = new AtomicInteger(0);
focal_class.type: AtomicInteger
focal_class.var_name: offset
focal_class.declarator: usedMemory = new AtomicInteger(0)
focal_class.modifier: private final
focal_class.original_string: private final AtomicInteger usedMemory = new AtomicInteger(0);
focal_class.type: AtomicInteger
focal_class.var_name: usedMemory
focal_class.declarator: dirtyMemory = new AtomicInteger(0)
focal_class.modifier: private final
focal_class.original_string: private final AtomicInteger dirtyMemory = new AtomicInteger(0);
focal_class.type: AtomicInteger
focal_class.var_name: dirtyMemory
focal_class.declarator: index
focal_class.modifier: private volatile
focal_class.original_string: private volatile int index;
focal_class.type: int
focal_class.var_name: index
focal_class.declarator: capacity
focal_class.modifier: private volatile
focal_class.original_string: private volatile long capacity;
focal_class.type: long
focal_class.var_name: capacity
focal_class.file: imcache-offheap/src/main/java/com/cetsoft/imcache/offheap/bytebuffer/OffHeapByteBuffer.java
focal_class.identifier: OffHeapByteBuffer
focal_class.interfaces: implements OffHeapStore
focal_class.class_method_signature: OffHeapByteBuffer.OffHeapByteBuffer(int index, int capacity)
focal_class.full_signature: public  OffHeapByteBuffer(int index, int capacity)
focal_class.identifier: OffHeapByteBuffer
focal_class.modifiers: public
focal_class.parameters: (int index, int capacity)
focal_class.signature:  OffHeapByteBuffer(int index, int capacity)
focal_class.class_method_signature: OffHeapByteBuffer.OffHeapByteBuffer(int index, int capacity, int concurrencyLevel)
focal_class.full_signature: public  OffHeapByteBuffer(int index, int capacity, int concurrencyLevel)
focal_class.identifier: OffHeapByteBuffer
focal_class.modifiers: public
focal_class.parameters: (int index, int capacity, int concurrencyLevel)
focal_class.signature:  OffHeapByteBuffer(int index, int capacity, int concurrencyLevel)
focal_class.class_method_signature: OffHeapByteBuffer.retrieve(final Pointer pointer)
focal_class.full_signature: public byte[] retrieve(final Pointer pointer)
focal_class.identifier: retrieve
focal_class.modifiers: public
focal_class.parameters: (final Pointer pointer)
focal_class.return: byte[]
focal_class.signature: byte[] retrieve(final Pointer pointer)
focal_class.class_method_signature: OffHeapByteBuffer.remove(Pointer pointer)
focal_class.full_signature: public byte[] remove(Pointer pointer)
focal_class.identifier: remove
focal_class.modifiers: public
focal_class.parameters: (Pointer pointer)
focal_class.return: byte[]
focal_class.signature: byte[] remove(Pointer pointer)
focal_class.class_method_signature: OffHeapByteBuffer.store(final byte[] payload, final long expiry)
focal_class.full_signature: public Pointer store(final byte[] payload, final long expiry)
focal_class.identifier: store
focal_class.modifiers: public
focal_class.parameters: (final byte[] payload, final long expiry)
focal_class.return: Pointer
focal_class.signature: Pointer store(final byte[] payload, final long expiry)
focal_class.class_method_signature: OffHeapByteBuffer.store(final Allocation allocation, byte[] payload, final long expiry)
focal_class.full_signature: public Pointer store(final Allocation allocation, byte[] payload, final long expiry)
focal_class.identifier: store
focal_class.modifiers: public
focal_class.parameters: (final Allocation allocation, byte[] payload, final long expiry)
focal_class.return: Pointer
focal_class.signature: Pointer store(final Allocation allocation, byte[] payload, final long expiry)
focal_class.class_method_signature: OffHeapByteBuffer.update(final Pointer pointer, final byte[] payload, final long expiry)
focal_class.full_signature: public Pointer update(final Pointer pointer, final byte[] payload, final long expiry)
focal_class.identifier: update
focal_class.modifiers: public
focal_class.parameters: (final Pointer pointer, final byte[] payload, final long expiry)
focal_class.return: Pointer
focal_class.signature: Pointer update(final Pointer pointer, final byte[] payload, final long expiry)
focal_class.class_method_signature: OffHeapByteBuffer.header(int length)
focal_class.full_signature: protected byte[] header(int length)
focal_class.identifier: header
focal_class.modifiers: protected
focal_class.parameters: (int length)
focal_class.return: byte[]
focal_class.signature: byte[] header(int length)
focal_class.class_method_signature: OffHeapByteBuffer.header(byte[] header)
focal_class.full_signature: protected int header(byte[] header)
focal_class.identifier: header
focal_class.modifiers: protected
focal_class.parameters: (byte[] header)
focal_class.return: int
focal_class.signature: int header(byte[] header)
focal_class.class_method_signature: OffHeapByteBuffer.markAsDirty(int offset)
focal_class.full_signature: protected void markAsDirty(int offset)
focal_class.identifier: markAsDirty
focal_class.modifiers: protected
focal_class.parameters: (int offset)
focal_class.return: void
focal_class.signature: void markAsDirty(int offset)
focal_class.class_method_signature: OffHeapByteBuffer.allocate(byte[] payload)
focal_class.full_signature: protected Allocation allocate(byte[] payload)
focal_class.identifier: allocate
focal_class.modifiers: protected
focal_class.parameters: (byte[] payload)
focal_class.return: Allocation
focal_class.signature: Allocation allocate(byte[] payload)
focal_class.class_method_signature: OffHeapByteBuffer.free()
focal_class.full_signature: public void free()
focal_class.identifier: free
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void free()
focal_class.class_method_signature: OffHeapByteBuffer.dirtyMemory()
focal_class.full_signature: public long dirtyMemory()
focal_class.identifier: dirtyMemory
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long dirtyMemory()
focal_class.class_method_signature: OffHeapByteBuffer.usedMemory()
focal_class.full_signature: public long usedMemory()
focal_class.identifier: usedMemory
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long usedMemory()
focal_class.class_method_signature: OffHeapByteBuffer.freeMemory()
focal_class.full_signature: public long freeMemory()
focal_class.identifier: freeMemory
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long freeMemory()
focal_class.class_method_signature: OffHeapByteBuffer.getIndex()
focal_class.full_signature: public int getIndex()
focal_class.identifier: getIndex
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getIndex()
focal_method.body: public byte[] remove(Pointer pointer) {
      readWriteLock.writeLock(pointer.getPosition());
      try {
        final byte[] payload = retrieve(pointer);
        dirtyMemory.addAndGet(payload.length + POINTER_SIZE);
        markAsDirty(pointer.getPosition());
        return payload;
      } finally {
        readWriteLock.writeUnlock(pointer.getPosition());
      }
    }
focal_method.class_method_signature: OffHeapByteBuffer.remove(Pointer pointer)
focal_method.full_signature: public byte[] remove(Pointer pointer)
focal_method.identifier: remove
focal_method.invocations: writeLock getPosition retrieve addAndGet markAsDirty getPosition writeUnlock getPosition
focal_method.modifiers: public
focal_method.parameters: (Pointer pointer)
focal_method.return: byte[]
focal_method.signature: byte[] remove(Pointer pointer)