public interface BackingCacheEntry<K extends Serializable,V extends Cacheable<K>> extends Cacheable<K>, Comparable<BackingCacheEntry<K,V>>
BackingCache
.Modifier and Type | Method and Description |
---|---|
void |
decreaseUsageCount()
Decreases the usage reference count
|
long |
getLastUsed()
Gets the timestamp of the last time this entry was in use.
|
V |
getUnderlyingItem()
Gets the underlying CacheItem.
|
void |
increaseUsageCount()
Increases the usage reference count
|
void |
invalidate()
Causes
isValid() to hereafter return true . |
boolean |
isInUse()
Gets whether this entry is in use by a caller.
|
boolean |
isPrePassivated()
Gets whether the entry can be passivated without invoking any callbacks on the underlying item.
|
boolean |
isValid()
Whether this entry has been invalidated (in which case it should be reacquired).
|
void |
lock()
Lock this item, blocking until the lock is acquired.
|
void |
setPrePassivated(boolean prePassivated)
Sets whether the entry can be passivated without invoking any callbacks on the underlying item.
|
boolean |
tryLock()
Attempt to lock this item, failing promptly if the lock is already held by another thread.
|
void |
unlock()
Unlock this item.
|
isModified
getId
compareTo
V getUnderlyingItem()
boolean isInUse()
void decreaseUsageCount()
void increaseUsageCount()
long getLastUsed()
boolean isPrePassivated()
void setPrePassivated(boolean prePassivated)
boolean tryLock()
true
if the lock was acquired, false
otherwisevoid lock()
RuntimeException
will be thrown if the thread is interrupted instead of
InterruptedException
.void unlock()
boolean isValid()
NOTE: This method should only be called with the lock held.
true
e if still valid, false
e if invalidatedinvalidate()
void invalidate()
isValid()
to hereafter return true
.
NOTE: This method should only be called with the lock held.
Copyright © 2013 JBoss by Red Hat. All rights reserved.