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:
-
Field Summary
Fields inherited from interface org.opendaylight.controller.cluster.datastore.modification.Modification
COMPOSITE, DELETE, MERGE, WRITE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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) Get a list of modifications contained by this composite.byte
getType()
void
void
void
Methods inherited from class org.opendaylight.controller.cluster.datastore.messages.VersionedExternalizableMessage
getStreamVersion, getVersion, toSerializable, toString
-
Constructor Details
-
MutableCompositeModification
public MutableCompositeModification() -
MutableCompositeModification
public MutableCompositeModification(short version)
-
-
Method Details
-
apply
Description copied from interface:Modification
Apply the modification to the specified transaction.- Specified by:
apply
in interfaceModification
- Parameters:
transaction
- the transaction
-
apply
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
Add a new Modification to the list of Modifications represented by this composite.- Parameters:
modification
- the modification to add.
-
addModifications
-
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
- Specified by:
readExternal
in interfaceExternalizable
- Specified by:
readExternal
in interfaceModification
- Overrides:
readExternal
in classVersionedExternalizableMessage
- Throws:
IOException
ClassNotFoundException
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Specified by:
writeExternal
in interfaceModification
- Overrides:
writeExternal
in classVersionedExternalizableMessage
- Throws:
IOException
-
fromSerializable
-
writeTo
- Specified by:
writeTo
in interfaceModification
- Throws:
IOException
-