public abstract class AbstractGridProjection extends java.lang.Object implements GridProjection
GridProjection.PRIORITY_COMPARATOR| Constructor and Description |
|---|
AbstractGridProjection()
Instantiates a new abstract grid projection.
|
AbstractGridProjection(org.apache.hadoop.conf.Configuration configuration)
Instantiates a new abstract grid projection.
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
acceptMember(GridMember member)
Asks a projection if it accepted a member.
|
protected boolean |
addAnyMember(GridMember member)
Adds the member to a any tracking list.
|
protected void |
addHostCountMember(java.lang.String host,
GridMember member)
Adds the host count member.
|
protected boolean |
addHostMember(GridMember member)
Adds the member to a host tracking list.
|
protected void |
addRackCountMember(java.lang.String rack,
GridMember member)
Adds the rack count member.
|
protected boolean |
addRackMember(GridMember member)
Adds the member to a rack tracking list.
|
protected boolean |
canFit(GridMember member)
Checks if a member can be fit in this projection.
|
protected int |
getAnyCount()
Gets the any count.
|
protected java.util.Collection<GridMember> |
getAnyCountMembers()
Gets the any count members.
|
org.apache.hadoop.conf.Configuration |
getConfiguration()
Gets the hadoop configuration.
|
protected int |
getHostCount(java.lang.String host)
Gets a count of hosts tracked by host.
|
protected java.util.Set<java.lang.String> |
getHostCountHosts()
Gets the host count hosts.
|
protected java.util.Collection<GridMember> |
getHostCountMembers(java.lang.String host)
Gets the host count members.
|
java.util.Collection<GridMember> |
getMembers()
Gets the members of this projection as
Collection. |
java.lang.Integer |
getMemory()
Gets the memory.
|
java.lang.Integer |
getPriority()
Gets the priority.
|
ProjectionData |
getProjectionData()
Gets the projection data.
|
protected int |
getRackCount(java.lang.String rack)
Gets a count of racks tracked by rack.
|
protected java.util.Set<java.lang.String> |
getRackCountHosts()
Gets the rack count hosts.
|
protected java.util.Collection<GridMember> |
getRackCountMembers(java.lang.String rack)
Gets the rack count members.
|
abstract SatisfyStateData |
getSatisfyState()
Gets the satisfy state.
|
java.lang.Integer |
getVirtualCores()
Gets the virtual cores.
|
GridMember |
removeMember(GridMember member)
Removes the member.
|
void |
setConfiguration(org.apache.hadoop.conf.Configuration configuration)
Sets the hadoop configuration.
|
void |
setMemory(java.lang.Integer memory)
Sets the memory.
|
void |
setPriority(java.lang.Integer priority)
Sets the priority.
|
void |
setProjectionData(ProjectionData data)
Sets the projection data.
|
void |
setVirtualCores(java.lang.Integer virtualCores)
Sets the virtual cores.
|
public AbstractGridProjection()
public AbstractGridProjection(org.apache.hadoop.conf.Configuration configuration)
configuration - the hadoop configurationpublic java.util.Collection<GridMember> getMembers()
GridProjectionCollection.getMembers in interface GridProjectionpublic void setProjectionData(ProjectionData data)
GridProjectionsetProjectionData in interface GridProjectiondata - the new projection datapublic ProjectionData getProjectionData()
GridProjectiongetProjectionData in interface GridProjectionpublic GridMember removeMember(GridMember member)
GridProjectionremoveMember in interface GridProjectionmember - the memberpublic abstract boolean acceptMember(GridMember member)
GridProjectionacceptMember in interface GridProjectionmember - the grid memberpublic abstract SatisfyStateData getSatisfyState()
GridProjectiongetSatisfyState in interface GridProjectionpublic java.lang.Integer getPriority()
getPriority in interface GridProjectionpublic void setPriority(java.lang.Integer priority)
priority - the new prioritypublic void setVirtualCores(java.lang.Integer virtualCores)
virtualCores - the new virtual corespublic java.lang.Integer getVirtualCores()
public void setMemory(java.lang.Integer memory)
memory - the new memorypublic java.lang.Integer getMemory()
protected boolean addHostMember(GridMember member)
member - the grid memberprotected boolean addRackMember(GridMember member)
member - the grid memberprotected boolean addAnyMember(GridMember member)
member - the grid memberprotected int getHostCount(java.lang.String host)
host - the hostprotected int getRackCount(java.lang.String rack)
rack - the rackprotected int getAnyCount()
protected java.util.Collection<GridMember> getHostCountMembers(java.lang.String host)
host - the hostprotected void addHostCountMember(java.lang.String host,
GridMember member)
host - the hostmember - the grid memberprotected void addRackCountMember(java.lang.String rack,
GridMember member)
rack - the rackmember - the grid memberprotected java.util.Collection<GridMember> getRackCountMembers(java.lang.String rack)
rack - the rackprotected java.util.Collection<GridMember> getAnyCountMembers()
protected java.util.Set<java.lang.String> getHostCountHosts()
protected java.util.Set<java.lang.String> getRackCountHosts()
public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
configuration - the new hadoop configurationpublic org.apache.hadoop.conf.Configuration getConfiguration()
protected boolean canFit(GridMember member)
member - the grid member