Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.io.journal
Class FlashJournalRM.BufferPool

java.lang.Object
  extended by com.tangosol.io.journal.FlashJournalRM.BufferPool

Enclosing class:
FlashJournalRM

protected static class FlashJournalRM.BufferPool
extends java.lang.Object

The BufferPool class recycles up to a maximum number of Buffer objects.


Constructor Summary
FlashJournalRM.BufferPool(int cbBuffer, int cMaxBuffers)
          Instantiate a buffer pool to provide buffers to the journal appending process.

 

Method Summary
 FlashJournalRM.Buffer allocate(byte[] abOv)
          Allocate a buffer from the buffer pool.
 int getSize()
          Determine the current size of the pool.
 void release(FlashJournalRM.Buffer buf)
          Return a buffer to the pool.
 java.lang.String toString()
          

 

Constructor Detail

FlashJournalRM.BufferPool

public FlashJournalRM.BufferPool(int cbBuffer,
                                 int cMaxBuffers)
Instantiate a buffer pool to provide buffers to the journal appending process.
Parameters:
cbBuffer - the size of each buffer
cMaxBuffers - the maximum number of buffers to hold on to

Method Detail

allocate

public FlashJournalRM.Buffer allocate(byte[] abOv)
Allocate a buffer from the buffer pool.
Parameters:
abOv - the overlay byte[]
Returns:
a Buffer instance

release

public void release(FlashJournalRM.Buffer buf)
Return a buffer to the pool. Note that this isn't a precisely limited pool; it's possible that it could hold slightly more than the maximum size due to the avoidance of synchronization.
Parameters:
buf - the Buffer to return to the pool

getSize

public int getSize()
Determine the current size of the pool.
Returns:
the number of buffers in the pool

toString

public java.lang.String toString()

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.