|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.io.journal.JournalBinaryStore
public class JournalBinaryStore
A BinaryStore that writes to a Journal.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.tangosol.io.BinaryStore |
---|
BinaryStore.SizeAware |
Field Summary | |
---|---|
protected java.util.concurrent.atomic.AtomicLong |
m_cbTotal Number of bytes in the Journal currently "owned" by this BinaryStore. |
protected Journal |
m_journal The journal manager for this BinaryStore. |
protected java.util.concurrent.locks.ReentrantReadWriteLock |
m_lock The read/write lock for concurrency control for the BinaryRadixTree. |
protected java.util.concurrent.locks.Lock |
m_lockExclusive The exclusive lock for performing mutating operations against the BinaryRadixTree. |
protected java.util.concurrent.locks.Lock |
m_lockShared The shared lock for performing read operations against the BinaryRadixTree. |
protected BinaryRadixTree |
m_treeTickets Mapping from Binary keys to journal "tickets". |
Constructor Summary | |
---|---|
JournalBinaryStore(Journal journal) Construct a JournalBinaryStore. |
Method Summary | |
---|---|
void |
close() Deprecated. use the Disposable interface |
void |
dedupe(byte[][] aab) This method may be invoked by the Journal implementation to request that any immutable byte arrays managed by the consumer be de-duplicated. |
void |
dispose() |
void |
erase(Binary binKey) Remove the specified key from the underlying store if present. |
void |
eraseAll() Remove all data from the underlying store. |
void |
evacuate(long lTicketMask, long lTicketValue) This method may be invoked by the Journal implementation to request that the consumer evacuate a particular journal file. |
long |
getByteCount() Calculate the total amount of data currently stored in the journal by this BinaryStore. |
java.lang.String |
getDescription() Format a String description of the Consumer. |
Journal |
getJournal() Obtain the underlying journaling system used by this BinaryStore. |
int |
getKeyCount() Determine the number of keys currently stored in the journal by this BinaryStore. |
protected BinaryRadixTree |
getTicketTree() An internal accessor for the "tree of tickets"; this accessor is used only by client threads, and has a built-in check for if the journal has already been disposed of (which could occur on a different thread). |
java.util.Iterator |
keys() Iterate all keys in the underlying store. |
Binary |
load(Binary binKey) Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store. |
int |
size() Determine the number of keys in the BinaryStore. |
void |
store(Binary binKey, Binary binValue) Store the specified value under the specific key in the underlying store. |
java.lang.String |
toString() |
Field Detail |
---|
protected Journal m_journal
protected BinaryRadixTree m_treeTickets
protected final java.util.concurrent.atomic.AtomicLong m_cbTotal
protected final java.util.concurrent.locks.ReentrantReadWriteLock m_lock
protected final java.util.concurrent.locks.Lock m_lockShared
protected final java.util.concurrent.locks.Lock m_lockExclusive
Constructor Detail |
---|
public JournalBinaryStore(Journal journal)
journal
- the Journal to write to and read fromMethod Detail |
---|
public Binary load(Binary binKey)
load
in interface BinaryStore
binKey
- key whose associated value is to be returnedpublic void store(Binary binKey, Binary binValue)
store
in interface BinaryStore
binKey
- key to store the value underbinValue
- value to be storedpublic void erase(Binary binKey)
erase
in interface BinaryStore
binKey
- key whose mapping is to be removed from the mappublic void eraseAll()
eraseAll
in interface BinaryStore
public java.util.Iterator keys()
keys
in interface BinaryStore
public int size()
size
in interface BinaryStore.SizeAware
public void evacuate(long lTicketMask, long lTicketValue)
evacuate
in interface Journal.JournalConsumer
lTicketMask
- indicates which bits of the tickets to checklTicketValue
- indicates what bit pattern needs to be matched on the tickets in order to select them for evacuationpublic void dedupe(byte[][] aab)
dedupe
in interface Journal.JournalConsumer
aab
- an array of byte[] objects for intern-ing byte[] referencespublic java.lang.String getDescription()
getDescription
in interface Journal.JournalConsumer
public void dispose()
public void close()
public java.lang.String toString()
public Journal getJournal()
public int getKeyCount()
public long getByteCount()
protected BinaryRadixTree getTicketTree()
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |