T
- the entity identifier typepublic class GenericEntity<T extends org.opendaylight.yangtools.concepts.Path<T>> extends Object implements Serializable, org.opendaylight.yangtools.concepts.Identifiable<T>
The type describes the type of the Entity where examples of a type maybe "openflow" or "netconf" etc. An Entity type could be tied to how exactly an application shares and "owns" an entity. For example we may want an application which deals with the openflow entity to be assigned ownership of that entity based on a first come first served basis. On the other hand for netconf entity types we may want applications to gain ownership based on a load balancing approach. While this mechanism of assigning a ownership acquisition strategy is not finalized the intention is that the entity type will play a role in determining the strategy and thus should be put in place.
The identifier is an instance identifier path. The reason for the choice of instance identifier path is because it can easily be used to represent a data node. For example an inventory node represents a shared entity and it is best referenced by its instance identifier path if the inventory node is stored in the data store.
Note that an entity identifier must conform to a valid yang schema. If there is no existing yang schema to represent an entity, the general-entity yang model can be used.
Modifier | Constructor and Description |
---|---|
protected |
GenericEntity(@NonNull String type,
T id) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
T |
getIdentifier()
Gets the id of the entity.
|
@NonNull String |
getType()
Gets the type of the entity.
|
int |
hashCode() |
String |
toString() |
Copyright © 2019 OpenDaylight. All rights reserved.