|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.cache.Modification
public class Modification
Represents a modification in the cache. Contains the nature of the modification (e.g. PUT, REMOVE), the fqn of the node, the new value and the previous value. A list of modifications will be sent to all nodes in a cluster when a transaction has been committed (PREPARE phase). A Modification is also used to roll back changes, e.g. since we know the previous value, we can reconstruct the previous state by applying the changes in a modification listin reverse order.
Field Summary | |
---|---|
static byte |
PUT_DATA
Put data (Map) modification. |
static byte |
PUT_DATA_ERASE
Erase existing data, put data (Map) modification. |
static byte |
PUT_KEY_VALUE
Put key/value modification. |
static byte |
REMOVE_DATA
Clear node's Map modification. |
static byte |
REMOVE_KEY_VALUE
Remove a key/value modification. |
static byte |
REMOVE_NODE
Remove a node modification. |
static byte |
STORE_STATE
Stores data in a Fqn using a byte array. |
Constructor Summary | |
---|---|
Modification()
Constructs a new modification. |
|
Modification(byte type,
Fqn fqn)
Constructs a new modification with fqn only. |
|
Modification(byte type,
Fqn fqn,
java.util.Map data)
Constructs a new modification with data map. |
|
Modification(byte type,
Fqn fqn,
java.lang.Object key)
Constructs a new modification with key. |
|
Modification(byte type,
Fqn fqn,
java.lang.Object key,
java.lang.Object value)
Constructs a new modification with details. |
Method Summary | |
---|---|
java.util.Map |
getData()
Returns the modification Map set. |
Fqn |
getFqn()
Returns the modification fqn. |
java.lang.Object |
getKey()
Returns the modification key. |
java.lang.Object |
getOldValue()
Returns the post modification old value. |
byte |
getType()
Returns the type of modification. |
java.lang.Object |
getValue()
Returns the modification value. |
void |
readExternal(java.io.ObjectInput in)
Reads data from an external stream. |
void |
setData(java.util.Map data)
Sets the modification Map set. |
void |
setFqn(Fqn fqn)
Sets the modification fqn. |
void |
setKey(java.lang.Object key)
Sets the modification key. |
void |
setOldValue(java.lang.Object old_value)
Sets the post modification old value. |
void |
setType(byte type)
Sets the type of modification. |
void |
setValue(java.lang.Object value)
Sets the modification value. |
java.lang.String |
toString()
Returns debug information about this modification. |
void |
writeExternal(java.io.ObjectOutput out)
Writes data to an external stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final byte PUT_KEY_VALUE
public static final byte PUT_DATA
public static final byte PUT_DATA_ERASE
public static final byte REMOVE_NODE
public static final byte REMOVE_KEY_VALUE
public static final byte REMOVE_DATA
public static final byte STORE_STATE
Constructor Detail |
---|
public Modification()
public Modification(byte type, Fqn fqn, java.lang.Object key, java.lang.Object value)
public Modification(byte type, Fqn fqn, java.lang.Object key)
public Modification(byte type, Fqn fqn, java.util.Map data)
public Modification(byte type, Fqn fqn)
Method Detail |
---|
public byte getType()
public void setType(byte type)
public Fqn getFqn()
public void setFqn(Fqn fqn)
public java.lang.Object getKey()
public void setKey(java.lang.Object key)
public java.lang.Object getValue()
public void setValue(java.lang.Object value)
public java.lang.Object getOldValue()
public void setOldValue(java.lang.Object old_value)
public java.util.Map getData()
public void setData(java.util.Map data)
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |