com.caucho.server.distcache
Class ExtCacheEntryFacade

java.lang.Object
  extended by com.caucho.server.distcache.ExtCacheEntryFacade
All Implemented Interfaces:
ExtCacheEntry, Cache.Entry

public final class ExtCacheEntryFacade
extends java.lang.Object
implements ExtCacheEntry

An entry in the cache map


Method Summary
 long getAccessedExpireTimeout()
          Returns the idle timeout
 java.lang.Object getKey()
          Returns the key for this entry in the Cache.
 HashKey getKeyHash()
          Returns the keyHash
 long getLastAccessedTime()
           
 long getLastModifiedTime()
          Returns the last update time.
 long getLeaseExpireTimeout()
          Returns the lease timeout
 int getLeaseOwner()
          Returns the lease owner
 int getLoadCount()
          Returns the load count.
 long getModifiedExpireTimeout()
          Returns the expire timeout.
 MnodeUpdate getRemoteUpdate()
           
 int getUserFlags()
           
 java.lang.Object getValue()
          Returns the value of the cache entry.
 long getValueHash()
          Returns the value key
 long getValueLength()
          Returns the value length
 StreamSource getValueStream()
          Returns the value of the cache entry.
 long getVersion()
           
 boolean isExpired(long now)
          Returns true when the entry is expired.
 boolean isValid()
           
 boolean isValueNull()
          Returns true if the value is null.
 boolean readData(java.io.OutputStream os, CacheConfig config)
          Writes the data to a stream.
 java.lang.String toString()
           
 void updateAccessTime()
          Update the access time on a read.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getKey

public final java.lang.Object getKey()
Returns the key for this entry in the Cache.

Specified by:
getKey in interface Cache.Entry

getKeyHash

public final HashKey getKeyHash()
Returns the keyHash

Specified by:
getKeyHash in interface ExtCacheEntry

getValue

public java.lang.Object getValue()
Returns the value of the cache entry.

Specified by:
getValue in interface ExtCacheEntry
Specified by:
getValue in interface Cache.Entry

isValueNull

public boolean isValueNull()
Returns true if the value is null.

Specified by:
isValueNull in interface ExtCacheEntry

getUserFlags

public final int getUserFlags()
Specified by:
getUserFlags in interface ExtCacheEntry

getValueStream

public StreamSource getValueStream()
Returns the value of the cache entry.

Specified by:
getValueStream in interface ExtCacheEntry

getValueHash

public long getValueHash()
Description copied from interface: ExtCacheEntry
Returns the value key

Specified by:
getValueHash in interface ExtCacheEntry

getValueLength

public long getValueLength()
Description copied from interface: ExtCacheEntry
Returns the value length

Specified by:
getValueLength in interface ExtCacheEntry

readData

public boolean readData(java.io.OutputStream os,
                        CacheConfig config)
                 throws java.io.IOException
Writes the data to a stream.

Specified by:
readData in interface ExtCacheEntry
Throws:
java.io.IOException

getAccessedExpireTimeout

public long getAccessedExpireTimeout()
Description copied from interface: ExtCacheEntry
Returns the idle timeout

Specified by:
getAccessedExpireTimeout in interface ExtCacheEntry

getModifiedExpireTimeout

public long getModifiedExpireTimeout()
Description copied from interface: ExtCacheEntry
Returns the expire timeout.

Specified by:
getModifiedExpireTimeout in interface ExtCacheEntry

isExpired

public boolean isExpired(long now)
Description copied from interface: ExtCacheEntry
Returns true when the entry is expired.

Specified by:
isExpired in interface ExtCacheEntry

updateAccessTime

public void updateAccessTime()
Description copied from interface: ExtCacheEntry
Update the access time on a read.

Specified by:
updateAccessTime in interface ExtCacheEntry

getLeaseExpireTimeout

public long getLeaseExpireTimeout()
Description copied from interface: ExtCacheEntry
Returns the lease timeout

Specified by:
getLeaseExpireTimeout in interface ExtCacheEntry

getLeaseOwner

public int getLeaseOwner()
Description copied from interface: ExtCacheEntry
Returns the lease owner

Specified by:
getLeaseOwner in interface ExtCacheEntry

getLastAccessedTime

public long getLastAccessedTime()
Specified by:
getLastAccessedTime in interface ExtCacheEntry
Returns:

getLastModifiedTime

public long getLastModifiedTime()
Description copied from interface: ExtCacheEntry
Returns the last update time.

Specified by:
getLastModifiedTime in interface ExtCacheEntry

getVersion

public long getVersion()
Specified by:
getVersion in interface ExtCacheEntry
Returns:

getRemoteUpdate

public MnodeUpdate getRemoteUpdate()
Specified by:
getRemoteUpdate in interface ExtCacheEntry

isValid

public boolean isValid()
Specified by:
isValid in interface ExtCacheEntry

getLoadCount

public int getLoadCount()
Description copied from interface: ExtCacheEntry
Returns the load count.

Specified by:
getLoadCount in interface ExtCacheEntry

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object