Package org.onosproject.store.service
Class DocumentTreeEvent<V>
- java.lang.Object
 - 
- org.onosproject.store.service.DocumentTreeEvent<V>
 
 
- 
- Type Parameters:
 V- tree node value type
public class DocumentTreeEvent<V> extends java.lang.ObjectA document tree modification event. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDocumentTreeEvent.TypeNature of document tree node change. 
- 
Constructor Summary
Constructors Constructor Description DocumentTreeEvent(DocumentPath path, java.util.Optional<Versioned<V>> newValue, java.util.Optional<Versioned<V>> oldValue)Constructs a newDocumentTreeEvent.DocumentTreeEvent(DocumentPath path, DocumentTreeEvent.Type type, java.util.Optional<Versioned<V>> newValue, java.util.Optional<Versioned<V>> oldValue)Constructs a newDocumentTreeEvent. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<Versioned<V>>newValue()Returns the new value.java.util.Optional<Versioned<V>>oldValue()Returns the old value.DocumentPathpath()Returns the path to the changed node.java.lang.StringtoString()DocumentTreeEvent.Typetype()Returns the change type. 
 - 
 
- 
- 
Constructor Detail
- 
DocumentTreeEvent
public DocumentTreeEvent(DocumentPath path, DocumentTreeEvent.Type type, java.util.Optional<Versioned<V>> newValue, java.util.Optional<Versioned<V>> oldValue)
Constructs a newDocumentTreeEvent.- Parameters:
 path- path to the nodetype- type of changenewValue- optional new value; will be empty if node was deletedoldValue- optional old value; will be empty if node was created
 
- 
DocumentTreeEvent
public DocumentTreeEvent(DocumentPath path, java.util.Optional<Versioned<V>> newValue, java.util.Optional<Versioned<V>> oldValue)
Constructs a newDocumentTreeEvent.- Parameters:
 path- path to the nodenewValue- optional new value; will be empty if node was deletedoldValue- optional old value; will be empty if node was created
 
 - 
 
- 
Method Detail
- 
path
public DocumentPath path()
Returns the path to the changed node.- Returns:
 - node path
 
 
- 
type
public DocumentTreeEvent.Type type()
Returns the change type.- Returns:
 - change type
 
 
- 
newValue
public java.util.Optional<Versioned<V>> newValue()
Returns the new value.- Returns:
 - optional new value; will be empty if node was deleted
 
 
- 
oldValue
public java.util.Optional<Versioned<V>> oldValue()
Returns the old value.- Returns:
 - optional old value; will be empty if node was created
 
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -