|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCoherenceApplicationEdition
com.tangosol.net.cache.ReadWriteBackingMap.WriteQueue
public class ReadWriteBackingMap.WriteQueue
A queue that only releases entries after a configurable period of time.
Nested Class Summary | |
---|---|
class |
ReadWriteBackingMap.WriteQueue.Entry
A queue entry that is scheduled to come out of the front of the queue no earlier than some specific point in time. |
Constructor Summary | |
---|---|
protected |
ReadWriteBackingMap.WriteQueue()
Construct a WriteQueue that holds write-behind entries. |
Method Summary | |
---|---|
Object |
add(Object oKey,
Object oValue)
Add an entry to the queue. |
boolean |
containsKey(Object oKey)
|
protected long |
getCutoffMillis()
Determine the time before which all entries that were added are now eligable for removing from the queue. |
int |
getDelaySeconds()
|
protected Map |
getEntryMap()
|
protected List |
getKeyList()
|
protected ReadWriteBackingMap.WriteQueue.Entry |
instantiateEntry(Object oKey)
Factory pattern: instantiate a queue entry. |
boolean |
isEmpty()
|
Map.Entry |
remove()
Wait for item in the queue to ripen (to be ready to be removed), and when there is one and it is ripe, then remove and return it. |
Map.Entry |
remove(Object oKey)
Remove a key from the queue if the key is in the queue. |
Map.Entry |
removeImmediate()
Remove the first key from the queue immediately. |
Map.Entry |
removeNoWait()
Check for a ripe or soft-ripe item in the queue, and if there is one, return it; otherwise, return null. |
void |
setDelaySeconds(int cSeconds)
Specify the number of seconds that an entry added to the queue will sit in the queue before being removable ("ripe"). |
int |
size()
|
Constructor Detail |
---|
protected ReadWriteBackingMap.WriteQueue()
Method Detail |
---|
public int getDelaySeconds()
public void setDelaySeconds(int cSeconds)
cSeconds
- the number of seconds to wait before allowing an
entry to be removed from the queuepublic Object add(Object oKey, Object oValue)
oKey
- the key objectoValue
- the value object
public Map.Entry remove(Object oKey)
oKey
- the key object
public Map.Entry removeImmediate()
public Map.Entry remove()
public Map.Entry removeNoWait()
remove(java.lang.Object)
method, this method will also remove
soft-ripe items as calculated using the write-batch factor. A
soft-ripe item is an item that has been in the write-behind queue
for at least the following duration:
D' = (1.0 - F)*Dwhere:
D = write-behind delay F = write-batch factor
public int size()
public boolean isEmpty()
public boolean containsKey(Object oKey)
oKey
- the key to look for
protected Map getEntryMap()
protected List getKeyList()
protected long getCutoffMillis()
System.currentTimeMillis()
to compare to entry
when-added values to determine which entries are ripeprotected ReadWriteBackingMap.WriteQueue.Entry instantiateEntry(Object oKey)
oKey
- the key for the new entry
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |