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 voidaddModification(Modification modification)Add a new Modification to the list of Modifications represented by this composite.voidaddModifications(Iterable<Modification> newMods)voidapply(DOMStoreWriteTransaction transaction)Apply the modification to the specified transaction.voidapply(DataTreeModification transaction)Apply the modification to the specified transaction.static MutableCompositeModificationfromSerializable(Object serializable)List<Modification>getModifications()Get a list of modifications contained by this composite.bytegetType()voidreadExternal(ObjectInput in)voidwriteExternal(ObjectOutput out)voidwriteTo(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:ModificationApply the modification to the specified transaction.- Specified by:
applyin interfaceModification- Parameters:
transaction- the transaction
-
apply
public void apply(DataTreeModification transaction)
Description copied from interface:ModificationApply the modification to the specified transaction.- Specified by:
applyin interfaceModification- Parameters:
transaction- the transaction
-
getType
public byte getType()
- Specified by:
getTypein 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:CompositeModificationGet a list of modifications contained by this composite.- Specified by:
getModificationsin interfaceCompositeModification- Returns:
- an immutable list of modifications
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Specified by:
readExternalin interfaceModification- Overrides:
readExternalin classVersionedExternalizableMessage- Throws:
IOExceptionClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Specified by:
writeExternalin interfaceModification- Overrides:
writeExternalin classVersionedExternalizableMessage- Throws:
IOException
-
fromSerializable
public static MutableCompositeModification fromSerializable(Object serializable)
-
writeTo
public void writeTo(NormalizedNodeDataOutput out) throws IOException
- Specified by:
writeToin interfaceModification- Throws:
IOException
-
-