Class AbstractReplicatedMap.MapEntry<K,V>
java.lang.Object
org.apache.catalina.tribes.tipis.AbstractReplicatedMap.MapEntry<K,V>
- Type Parameters:
K- The type of keys maintained by this mapV- The type of mapped values
- All Implemented Interfaces:
Map.Entry<K,V>
- Enclosing class:
AbstractReplicatedMap<K,V>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(byte[] data, int offset, int length, boolean diff) apply a diff, or an entire objectbooleanMember[]Gets the backup nodes for this entry.getKey()Gets the key for this entry.Gets the primary member for this entry.getValue()Gets the value for this entry.inthashCode()booleanisActive()Checks if this entry is active.booleanisBackup()Checks if this entry is a backup.booleanisCopy()Checks if this entry is a copy.booleanChecks if this entry is diffable.booleanChecks if the key is serializable.booleanChecks if this entry is primary.booleanisProxy()Checks if this entry is a proxy.booleanChecks if both the key and value are serializable.booleanChecks if the value is serializable.voidsetBackup(boolean backup) Sets whether this entry is a backup.voidsetBackupNodes(Member[] nodes) Sets the backup nodes for this entry.voidsetCopy(boolean copy) Sets whether this entry is a copy.Sets the key for this entry.voidsetPrimary(Member m) Sets the primary member for this entry.voidsetProxy(boolean proxy) Sets whether this entry is a proxy.Sets the value for this entry.toString()Returns a string representation of this map entry.
-
Constructor Details
-
MapEntry
-
-
Method Details
-
isKeySerializable
public boolean isKeySerializable()Checks if the key is serializable.- Returns:
trueif the key is serializable or null
-
isValueSerializable
public boolean isValueSerializable()Checks if the value is serializable.- Returns:
trueif the value is serializable or null
-
isSerializable
public boolean isSerializable()Checks if both the key and value are serializable.- Returns:
trueif both key and value are serializable
-
isBackup
public boolean isBackup()Checks if this entry is a backup.- Returns:
trueif this entry is a backup
-
setBackup
public void setBackup(boolean backup) Sets whether this entry is a backup.- Parameters:
backup-trueif this entry is a backup
-
isProxy
public boolean isProxy()Checks if this entry is a proxy.- Returns:
trueif this entry is a proxy
-
isPrimary
public boolean isPrimary()Checks if this entry is primary.- Returns:
trueif this entry is primary
-
isActive
public boolean isActive()Checks if this entry is active.- Returns:
trueif this entry is active
-
setProxy
public void setProxy(boolean proxy) Sets whether this entry is a proxy.- Parameters:
proxy-trueif this entry is a proxy
-
isCopy
public boolean isCopy()Checks if this entry is a copy.- Returns:
trueif this entry is a copy
-
setCopy
public void setCopy(boolean copy) Sets whether this entry is a copy.- Parameters:
copy-trueif this entry is a copy
-
isDiffable
public boolean isDiffable()Checks if this entry is diffable.- Returns:
trueif this entry is diffable
-
setBackupNodes
Sets the backup nodes for this entry.- Parameters:
nodes- The backup nodes
-
getBackupNodes
-
setPrimary
Sets the primary member for this entry.- Parameters:
m- The primary member
-
getPrimary
-
getValue
-
setValue
-
getKey
-
setKey
-
hashCode
-
equals
-
apply
public void apply(byte[] data, int offset, int length, boolean diff) throws IOException, ClassNotFoundException apply a diff, or an entire object- Parameters:
data- byte[]offset- intlength- intdiff- boolean- Throws:
IOException- IO errorClassNotFoundException- Deserialization error
-
toString
-