@Test public void freeWithIndex() { bufferStore.buffers = new OffHeapByteBuffer[]{buffer}; bufferStore.availableBuffers = queue; doReturn(true).when(queue).add(anyInt()); doNothing().when(buffer).free(); bufferStore.free(0); verify(buffer).free(); verify(queue).add(anyInt()); }
public void free() { for (int i = 0; i < bufferSize; i++) { free(i); } }
OffHeapByteBufferStore implements OffHeapStore { public void free() { for (int i = 0; i < bufferSize; i++) { free(i); } } }
OffHeapByteBufferStore implements OffHeapStore { public void free() { for (int i = 0; i < bufferSize; i++) { free(i); } } OffHeapByteBufferStore(int capacity, int bufferSize);  OffHeapByteBufferStore(int capacity, int bufferSize, int concurrencyLevel); }
OffHeapByteBufferStore implements OffHeapStore { public void free() { for (int i = 0; i < bufferSize; i++) { free(i); } } OffHeapByteBufferStore(int capacity, int bufferSize);  OffHeapByteBufferStore(int capacity, int bufferSize, int concurrencyLevel); byte[] retrieve(Pointer pointer); byte[] remove(Pointer pointer); Pointer store(byte[] payload, long expiry); Pointer update(final Pointer pointer, final byte[] payload, final long expiry); long dirtyMemory(); long usedMemory(); long freeMemory(); void free(); void free(int bufferIndex); }
OffHeapByteBufferStore implements OffHeapStore { public void free() { for (int i = 0; i < bufferSize; i++) { free(i); } } OffHeapByteBufferStore(int capacity, int bufferSize);  OffHeapByteBufferStore(int capacity, int bufferSize, int concurrencyLevel); byte[] retrieve(Pointer pointer); byte[] remove(Pointer pointer); Pointer store(byte[] payload, long expiry); Pointer update(final Pointer pointer, final byte[] payload, final long expiry); long dirtyMemory(); long usedMemory(); long freeMemory(); void free(); void free(int bufferIndex);  }