org.jboss.cache
Class Modification
java.lang.Object
org.jboss.cache.Modification
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable
public class Modification
- extends java.lang.Object
- implements java.io.Externalizable
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.
- Version:
- $Revision: 1.2 $
- Author:
- Bela Ban Apr 12, 2003
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PUT_KEY_VALUE
public static final byte PUT_KEY_VALUE
- See Also:
- Constant Field Values
PUT_DATA
public static final byte PUT_DATA
- See Also:
- Constant Field Values
PUT_DATA_ERASE
public static final byte PUT_DATA_ERASE
- See Also:
- Constant Field Values
REMOVE_NODE
public static final byte REMOVE_NODE
- See Also:
- Constant Field Values
REMOVE_KEY_VALUE
public static final byte REMOVE_KEY_VALUE
- See Also:
- Constant Field Values
REMOVE_DATA
public static final byte REMOVE_DATA
- See Also:
- Constant Field Values
Modification
public Modification()
Modification
public Modification(byte type,
Fqn fqn,
java.lang.Object key,
java.lang.Object value)
Modification
public Modification(byte type,
Fqn fqn,
java.lang.Object key)
Modification
public Modification(byte type,
Fqn fqn,
java.util.Map data)
Modification
public Modification(byte type,
Fqn fqn)
getType
public byte getType()
setType
public void setType(byte type)
getFqn
public Fqn getFqn()
setFqn
public void setFqn(Fqn fqn)
getKey
public java.lang.Object getKey()
setKey
public void setKey(java.lang.Object key)
getValue
public java.lang.Object getValue()
setValue
public void setValue(java.lang.Object value)
getOldValue
public java.lang.Object getOldValue()
setOldValue
public void setOldValue(java.lang.Object old_value)
getData
public java.util.Map getData()
setData
public void setData(java.util.Map data)
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal
in interface java.io.Externalizable
- Throws:
java.io.IOException
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal
in interface java.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 1998-2005 JBoss Inc . All Rights Reserved.