|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool
public class PersistenceWindowPool
Manages persistence windows for a store. Each store
can configure how much memory it has for
memory mapped windows. This class tries to
make the most efficient use of those windows by allocating them in such a way
that the most frequently used records/blocks (be it for read or write
operations) are encapsulated by a memory mapped persistence window.
| Constructor Summary | |
|---|---|
PersistenceWindowPool(String storeName,
int blockSize,
FileChannel fileChannel,
long mappedMem,
boolean useMemoryMappedBuffers,
boolean readOnly)
Create new pool for a store. |
|
| Method Summary | |
|---|---|
PersistenceWindow |
acquire(long position,
OperationType operationType)
Acquires a windows for position and operationType
locking the window preventing other threads from using it. |
void |
release(PersistenceWindow window)
Releases a window used for an operation back to the pool and unlocks it so other threads may use it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersistenceWindowPool(String storeName,
int blockSize,
FileChannel fileChannel,
long mappedMem,
boolean useMemoryMappedBuffers,
boolean readOnly)
storeName - Name of store that use this poolblockSize - The size of each record/block in the storefileChannel - A fileChannel to the storemappedMem - Number of bytes dedicated to memory mapped windows
IOException - If unable to create pool| Method Detail |
|---|
public PersistenceWindow acquire(long position,
OperationType operationType)
position and operationType
locking the window preventing other threads from using it.
position - The position the needs to be encapsulated by the windowoperationType - The type of operation (READ or WRITE)
IOException - If unable to acquire the windowpublic void release(PersistenceWindow window)
window - The window to be released
IOException - If unable to release window
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||