public interface Grid
Modifier and Type | Method and Description |
---|---|
void |
addGridListener(GridListener listener)
Adds a listener to be notified of grid members events.
|
void |
addInterceptor(GridMemberInterceptor interceptor)
Adds a grid member interceptor.
|
boolean |
addMember(GridMember member)
Adds a new grid member.
|
GridMember |
getMember(org.apache.hadoop.yarn.api.records.ContainerId id)
Gets a grid member.
|
java.util.Collection<GridMember> |
getMembers()
Gets collection of grid members know to the grid system or
empty collection if there are no known members.
|
boolean |
removeMember(org.apache.hadoop.yarn.api.records.ContainerId id)
Removes a grid member.
|
java.util.Collection<GridMember> getMembers()
GridMember getMember(org.apache.hadoop.yarn.api.records.ContainerId id)
id
- the container id identifierNULL
if member doesn't existboolean addMember(GridMember member)
If a grid refuses to add a particular member for any reason other than that it already contains the member, it must throw an exception (rather than returning false). This preserves the invariant that a grid always contains the specified node after this call returns.
member
- the grid memberboolean removeMember(org.apache.hadoop.yarn.api.records.ContainerId id)
Removes a single instance of the specified member from this grid, if it is present.
id
- the container id identifiervoid addGridListener(GridListener listener)
listener
- the grid listenervoid addInterceptor(GridMemberInterceptor interceptor)
interceptor
- the interceptor