public interface SerializationGroupMember<K extends Serializable,V extends Cacheable<K>,G extends Serializable> extends BackingCacheEntry<K,V>
BackingCacheEntry
that wraps an underlying CacheItem
and represents
it as a potential member of a SerializationGroup
. Note that a particular instance need not actually
be a member of a group; such an instance will return null
from getGroupId()
.Modifier and Type | Method and Description |
---|---|
SerializationGroup<K,V,G> |
getGroup()
Gets the group of which this object is a member.
|
G |
getGroupId()
Gets the
Identifiable.getId() of this object's SerializationGroup . |
boolean |
isPreReplicated()
Gets whether pre-replication callbacks have been invoked on the underlying item.
|
void |
prePassivate()
Instructs this group member to ensure any prePassivate callbacks are invoked on the underlying item and any internal
references to its group and underlying item are released.
|
void |
preReplicate()
Instructs this group member to ensure any preReplicate callbacks are invoked on the underlying item and any internal
references to its group and underlying item are released.
|
void |
setGroup(SerializationGroup<K,V,G> group)
Sets the group to which this object belongs.
|
void |
setPassivatingCache(GroupAwareBackingCache<K,V,G,SerializationGroupMember<K,V,G>> cache)
Provides a reference to the cache that is managing this item.
|
void |
setPreReplicated(boolean preReplicated)
Sets whether pre-replication callbacks have been invoked on the underlying item.
|
void |
setUnderlyingItem(V obj)
Sets this object's underlying item.
|
getLastUsed, getUnderlyingItem, invalidate, isInUse, isPrePassivated, isValid, lock, setInUse, setPrePassivated, tryLock, unlock
isModified
getId
compareTo
SerializationGroup<K,V,G> getGroup()
null
if the instance is not a member of the group (use getGroupId()
to check for this) or does not currently have a reference to its group.void setGroup(SerializationGroup<K,V,G> group)
groupId
.group
- May be null
, which does not mean the member is no longer part of a group, but rather that any
reference to the group should be released.G getGroupId()
Identifiable.getId()
of this object's SerializationGroup
. Will return null
if this
object has not yet been assigned to a group
.null
void prePassivate()
SerializationGroup
itself.void preReplicate()
SerializationGroup
itself.void setPassivatingCache(GroupAwareBackingCache<K,V,G,SerializationGroupMember<K,V,G>> cache)
cache
- the cache. May be null
.void setUnderlyingItem(V obj)
obj
- the underlying item. Cannot be null
.boolean isPreReplicated()
void setPreReplicated(boolean preReplicated)
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.