@InterfaceAudience.Public @InterfaceStability.Unstable public class TimelineEntity extends Object implements Comparable<TimelineEntity>
The class that contains the the meta information of some conceptual entity and its related events. The entity can be an application, an application attempt, a container or whatever the user-defined object.
Primary filters will be used to index the entities in
TimelineStore
, such that users should carefully choose the
information they want to store as the primary filters. The remaining can be
stored as other information.
Constructor and Description |
---|
TimelineEntity() |
Modifier and Type | Method and Description |
---|---|
void |
addEvent(TimelineEvent event)
Add a single event related to the entity to the existing event list
|
void |
addEvents(List<TimelineEvent> events)
Add a list of events related to the entity to the existing event list
|
void |
addOtherInfo(Map<String,Object> otherInfo)
Add a map of other information of the entity to the existing other info map
|
void |
addOtherInfo(String key,
Object value)
Add one piece of other information of the entity to the existing other info
map
|
void |
addPrimaryFilter(String key,
Object value)
Add a single piece of primary filter to the existing primary filter map
|
void |
addPrimaryFilters(Map<String,Set<Object>> primaryFilters)
Add a map of primary filters to the existing primary filter map
|
void |
addRelatedEntities(Map<String,Set<String>> relatedEntities)
Add a map of related entities to the existing related entity map
|
void |
addRelatedEntity(String entityType,
String entityId)
Add an entity to the existing related entity map
|
int |
compareTo(TimelineEntity other) |
boolean |
equals(Object obj) |
String |
getDomainId()
Get the ID of the domain that the entity is to be put
|
String |
getEntityId()
Get the entity Id
|
String |
getEntityType()
Get the entity type
|
List<TimelineEvent> |
getEvents()
Get a list of events related to the entity
|
Map<String,Object> |
getOtherInfo()
Get the other information of the entity
|
Map<String,Set<Object>> |
getPrimaryFilters()
Get the primary filters
|
Map<String,Set<String>> |
getRelatedEntities()
Get the related entities
|
Long |
getStartTime()
Get the start time of the entity
|
int |
hashCode() |
void |
setDomainId(String domainId)
Set the ID of the domain that the entity is to be put
|
void |
setEntityId(String entityId)
Set the entity Id
|
void |
setEntityType(String entityType)
Set the entity type
|
void |
setEvents(List<TimelineEvent> events)
Set the event list to the given list of events related to the entity
|
void |
setOtherInfo(Map<String,Object> otherInfo)
Set the other info map to the given map of other information
|
void |
setPrimaryFilters(Map<String,Set<Object>> primaryFilters)
Set the primary filter map to the given map of primary filters
|
void |
setRelatedEntities(Map<String,Set<String>> relatedEntities)
Set the related entity map to the given map of related entities
|
void |
setStartTime(Long startTime)
Set the start time of the entity
|
public TimelineEntity()
public String getEntityType()
public void setEntityType(String entityType)
entityType
- the entity typepublic String getEntityId()
public void setEntityId(String entityId)
entityId
- the entity Idpublic Long getStartTime()
public void setStartTime(Long startTime)
startTime
- the start time of the entitypublic List<TimelineEvent> getEvents()
public void addEvent(TimelineEvent event)
event
- a single event related to the entitypublic void addEvents(List<TimelineEvent> events)
events
- a list of events related to the entitypublic void setEvents(List<TimelineEvent> events)
events
- events a list of events related to the entitypublic Map<String,Set<String>> getRelatedEntities()
public void addRelatedEntity(String entityType, String entityId)
entityType
- the entity typeentityId
- the entity Idpublic void addRelatedEntities(Map<String,Set<String>> relatedEntities)
relatedEntities
- a map of related entitiespublic void setRelatedEntities(Map<String,Set<String>> relatedEntities)
relatedEntities
- a map of related entitiespublic Map<String,Set<Object>> getPrimaryFilters()
public void addPrimaryFilter(String key, Object value)
key
- the primary filter keyvalue
- the primary filter valuepublic void addPrimaryFilters(Map<String,Set<Object>> primaryFilters)
primaryFilters
- a map of primary filterspublic void setPrimaryFilters(Map<String,Set<Object>> primaryFilters)
primaryFilters
- a map of primary filterspublic Map<String,Object> getOtherInfo()
public void addOtherInfo(String key, Object value)
key
- the other information keyvalue
- the other information valuepublic void addOtherInfo(Map<String,Object> otherInfo)
otherInfo
- a map of other informationpublic void setOtherInfo(Map<String,Object> otherInfo)
otherInfo
- a map of other informationpublic String getDomainId()
public void setDomainId(String domainId)
domainId
- the name space IDpublic int compareTo(TimelineEntity other)
compareTo
in interface Comparable<TimelineEntity>
Copyright © 2015 Apache Software Foundation. All Rights Reserved.