public class DistCacheEntry
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
clear()
Invalidates the entry
|
void |
clearLease() |
void |
clearLease(int oldLeaseOwner) |
protected boolean |
compareAndPut(DistCacheEntry entry,
long testValue,
MnodeUpdate mnodeUpdate,
long valueDataId,
long valueDataTime,
java.lang.Object value,
CacheConfig config) |
boolean |
compareAndPut(long testValue,
java.lang.Object value) |
boolean |
compareAndPutLocal(long testValueHash,
MnodeUpdate update,
long valueDataId,
long valueDataTime,
java.lang.Object value) |
boolean |
compareAndPutLocal(long testValue,
MnodeUpdate update,
StreamSource source) |
boolean |
compareAndSetEntry(MnodeEntry oldMnodeValue,
MnodeEntry mnodeValue)
Sets the current value.
|
java.lang.Object |
get()
Returns the object for the given key, checking the backing if necessary.
|
java.lang.Object |
getAndPut(java.lang.Object value)
Sets the current value
|
protected java.lang.Object |
getAndPut(java.lang.Object value,
long now,
MnodeEntry mnodeValue)
Sets a cache entry
|
long |
getAndPutLocal(DistCacheEntry entry,
MnodeUpdate mnodeUpdate,
long valueDataId,
long valueDataTime,
java.lang.Object value) |
DataStore.DataItem |
getAndPutLocal(MnodeUpdate mnodeUpdate,
StreamSource source) |
java.lang.Object |
getAndRemove()
Remove the value
|
java.lang.Object |
getAndReplace(long testValue,
java.lang.Object value) |
CacheHandle |
getCache() |
HashKey |
getCacheKey() |
byte[] |
getCacheKeyHash() |
CacheConfig |
getConfig() |
long |
getCost() |
CacheEngine |
getEngine() |
java.lang.Object |
getKey()
Returns the key for this entry in the Cache.
|
HashKey |
getKeyHash()
Returns the keyHash
|
int |
getLoadCount() |
boolean |
getLocalStream(java.io.OutputStream os)
Gets a cache entry as a stream
|
MnodeEntry |
getMnodeEntry()
Returns the value section of the entry.
|
TriadOwner |
getOwner()
Returns the owner
|
boolean |
getStream(java.io.OutputStream os)
Gets a cache entry as a stream
|
java.lang.Object |
getValue() |
long |
getValueHash() |
long |
getValueHash(java.lang.Object value,
CacheConfig config) |
StreamSource |
getValueStream()
Gets a cache entry as a stream
|
long |
getVersion() |
boolean |
isLeaseExpired() |
boolean |
isModified(MnodeValue newValue) |
void |
load() |
void |
load(DistCacheLoadListener listener) |
CacheUpdateWithSource |
loadCacheStream(long requestVersion,
boolean isValueStream) |
MnodeEntry |
loadMnodeValue()
Returns the object for the given key, checking the backing if necessary
|
MnodeUpdate |
localUpdate(MnodeUpdate update,
java.io.InputStream is) |
void |
put(java.io.InputStream is)
Sets the value by an input stream
|
void |
put(java.io.InputStream is,
long accessedExpireTimeout,
long modifiedExpireTimeout)
Sets the value by an input stream
|
void |
put(java.io.InputStream is,
long accessedExpireTimeout,
long modifiedExpireTimeout,
int flags)
Sets the value by an input stream
|
void |
put(java.io.InputStream is,
long accessedExpireTimeout,
long modifiedExpireTimeout,
long lastAccessTime,
long lastModifiedTime)
Sets the value by an input stream
|
void |
put(java.lang.Object value)
Sets a cache entry
|
protected void |
put(java.lang.Object value,
long now,
MnodeEntry mnodeEntry,
boolean isWriteThrough)
Sets a cache entry
|
boolean |
putIfNew(MnodeUpdate update,
java.io.InputStream is)
Sets the value by an input stream
|
void |
putIfNewer(long version,
java.io.InputStream is)
Sets the value by an input stream
|
void |
putInternal(java.lang.Object value)
Sets a cache entry
|
void |
putLocal(java.io.InputStream is)
Sets the value by an input stream
|
MnodeEntry |
putLocalValue(MnodeEntry mnodeValue)
Sets a cache entry
|
MnodeEntry |
putLocalValue(MnodeUpdate mnodeUpdate,
DataStore.DataItem valueData,
java.lang.Object value)
Sets a cache entry
|
MnodeValue |
putLocalValue(MnodeUpdate mnodeUpdate,
java.io.InputStream is)
Sets a cache entry
|
MnodeEntry |
putLocalValue(MnodeUpdate mnodeUpdate,
long valueDataId,
long valueDataTime,
java.lang.Object value)
Sets a cache entry
|
boolean |
readData(java.io.OutputStream os,
CacheConfig config)
Writes the data to a stream.
|
boolean |
remove()
Sets a cache entry
|
void |
setKey(java.lang.Object key) |
java.lang.String |
toString() |
protected void |
updateAccessTime() |
void |
updateLease(int leaseOwner) |
void |
updateModifiedTime() |
public final java.lang.Object getKey()
public final void setKey(java.lang.Object key)
public final HashKey getKeyHash()
public final TriadOwner getOwner()
public HashKey getCacheKey()
public byte[] getCacheKeyHash()
public CacheHandle getCache()
public CacheConfig getConfig()
public CacheEngine getEngine()
public final MnodeEntry getMnodeEntry()
public java.lang.Object get()
public MnodeEntry loadMnodeValue()
public final StreamSource getValueStream()
public long getValueHash(java.lang.Object value, CacheConfig config)
public CacheUpdateWithSource loadCacheStream(long requestVersion, boolean isValueStream)
public final void put(java.lang.Object value)
public final void putInternal(java.lang.Object value)
public void put(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public void putLocal(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public void put(java.io.InputStream is, long accessedExpireTimeout, long modifiedExpireTimeout) throws java.io.IOException
java.io.IOException
public void put(java.io.InputStream is, long accessedExpireTimeout, long modifiedExpireTimeout, long lastAccessTime, long lastModifiedTime) throws java.io.IOException
java.io.IOException
public void put(java.io.InputStream is, long accessedExpireTimeout, long modifiedExpireTimeout, int flags) throws java.io.IOException
java.io.IOException
public void putIfNewer(long version, java.io.InputStream is) throws java.io.IOException
java.io.IOException
public final boolean remove()
public boolean putIfNew(MnodeUpdate update, java.io.InputStream is) throws java.io.IOException
java.io.IOException
public boolean compareAndPut(long testValue, java.lang.Object value)
public final boolean compareAndPutLocal(long testValue, MnodeUpdate update, StreamSource source)
public boolean compareAndPutLocal(long testValueHash, MnodeUpdate update, long valueDataId, long valueDataTime, java.lang.Object value)
protected boolean compareAndPut(DistCacheEntry entry, long testValue, MnodeUpdate mnodeUpdate, long valueDataId, long valueDataTime, java.lang.Object value, CacheConfig config)
public java.lang.Object getAndRemove()
public java.lang.Object getAndReplace(long testValue, java.lang.Object value)
public java.lang.Object getAndPut(java.lang.Object value)
protected final java.lang.Object getAndPut(java.lang.Object value, long now, MnodeEntry mnodeValue)
public DataStore.DataItem getAndPutLocal(MnodeUpdate mnodeUpdate, StreamSource source)
public long getAndPutLocal(DistCacheEntry entry, MnodeUpdate mnodeUpdate, long valueDataId, long valueDataTime, java.lang.Object value)
public final boolean compareAndSetEntry(MnodeEntry oldMnodeValue, MnodeEntry mnodeValue)
public boolean readData(java.io.OutputStream os, CacheConfig config) throws java.io.IOException
java.io.IOException
public boolean isModified(MnodeValue newValue)
public void clearLease(int oldLeaseOwner)
public void clearLease()
public boolean isLeaseExpired()
public void updateLease(int leaseOwner)
public long getCost()
public void load()
public void load(DistCacheLoadListener listener)
public long getValueHash()
public long getVersion()
public java.lang.Object getValue()
public final boolean getStream(java.io.OutputStream os) throws java.io.IOException
java.io.IOException
public final boolean getLocalStream(java.io.OutputStream os) throws java.io.IOException
java.io.IOException
public MnodeUpdate localUpdate(MnodeUpdate update, java.io.InputStream is)
public final MnodeValue putLocalValue(MnodeUpdate mnodeUpdate, java.io.InputStream is)
public final MnodeEntry putLocalValue(MnodeUpdate mnodeUpdate, DataStore.DataItem valueData, java.lang.Object value)
public final MnodeEntry putLocalValue(MnodeUpdate mnodeUpdate, long valueDataId, long valueDataTime, java.lang.Object value)
protected final void put(java.lang.Object value, long now, MnodeEntry mnodeEntry, boolean isWriteThrough)
public final MnodeEntry putLocalValue(MnodeEntry mnodeValue)
public void updateModifiedTime()
protected final void updateAccessTime()
public void clear()
public int getLoadCount()
public java.lang.String toString()
toString
in class java.lang.Object