Class MutableCompositeModification
- java.lang.Object
-
- org.opendaylight.controller.cluster.datastore.messages.VersionedExternalizableMessage
-
- org.opendaylight.controller.cluster.datastore.modification.MutableCompositeModification
-
- All Implemented Interfaces:
Externalizable
,Serializable
,SerializableMessage
,CompositeModification
,Modification
- Direct Known Subclasses:
BatchedModifications
public class MutableCompositeModification extends VersionedExternalizableMessage implements CompositeModification
MutableCompositeModification is just a mutable version of a CompositeModification.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.opendaylight.controller.cluster.datastore.modification.Modification
COMPOSITE, DELETE, MERGE, WRITE
-
-
Constructor Summary
Constructors Constructor Description MutableCompositeModification()
MutableCompositeModification(short version)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addModification(Modification modification)
Add a new Modification to the list of Modifications represented by this composite.void
addModifications(Iterable<Modification> newMods)
void
apply(DOMStoreWriteTransaction transaction)
Apply the modification to the specified transaction.void
apply(DataTreeModification transaction)
Apply the modification to the specified transaction.static MutableCompositeModification
fromSerializable(Object serializable)
List<Modification>
getModifications()
Get a list of modifications contained by this composite.byte
getType()
void
readExternal(ObjectInput in)
void
writeExternal(ObjectOutput out)
void
writeTo(NormalizedNodeDataOutput out)
-
Methods inherited from class org.opendaylight.controller.cluster.datastore.messages.VersionedExternalizableMessage
getStreamVersion, getVersion, toSerializable, toString
-
-
-
-
Method Detail
-
apply
public void apply(DOMStoreWriteTransaction transaction)
Description copied from interface:Modification
Apply the modification to the specified transaction.- Specified by:
apply
in interfaceModification
- Parameters:
transaction
- the transaction
-
apply
public void apply(DataTreeModification transaction)
Description copied from interface:Modification
Apply the modification to the specified transaction.- Specified by:
apply
in interfaceModification
- Parameters:
transaction
- the transaction
-
getType
public byte getType()
- Specified by:
getType
in interfaceModification
-
addModification
public void addModification(Modification modification)
Add a new Modification to the list of Modifications represented by this composite.- Parameters:
modification
- the modification to add.
-
addModifications
public void addModifications(Iterable<Modification> newMods)
-
getModifications
public List<Modification> getModifications()
Description copied from interface:CompositeModification
Get a list of modifications contained by this composite.- Specified by:
getModifications
in interfaceCompositeModification
- Returns:
- an immutable list of modifications
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Specified by:
readExternal
in interfaceModification
- Overrides:
readExternal
in classVersionedExternalizableMessage
- Throws:
IOException
ClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Specified by:
writeExternal
in interfaceModification
- Overrides:
writeExternal
in classVersionedExternalizableMessage
- Throws:
IOException
-
fromSerializable
public static MutableCompositeModification fromSerializable(Object serializable)
-
writeTo
public void writeTo(NormalizedNodeDataOutput out) throws IOException
- Specified by:
writeTo
in interfaceModification
- Throws:
IOException
-
-