public abstract class AbstractGridProjection extends Object implements GridProjection
GridProjection.PRIORITY_COMPARATOR| Constructor and Description |
|---|
AbstractGridProjection()
Instantiates a new abstract grid projection.
|
AbstractGridProjection(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(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(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 Collection<GridMember> |
getAnyCountMembers()
Gets the any count members.
|
Configuration |
getConfiguration()
Gets the hadoop configuration.
|
protected int |
getHostCount(String host)
Gets a count of hosts tracked by host.
|
protected Set<String> |
getHostCountHosts()
Gets the host count hosts.
|
protected Collection<GridMember> |
getHostCountMembers(String host)
Gets the host count members.
|
Collection<GridMember> |
getMembers()
Gets the members of this projection as
Collection. |
Integer |
getMemory()
Gets the memory.
|
Integer |
getPriority()
Gets the priority.
|
ProjectionData |
getProjectionData()
Gets the projection data.
|
protected int |
getRackCount(String rack)
Gets a count of racks tracked by rack.
|
protected Set<String> |
getRackCountHosts()
Gets the rack count hosts.
|
protected Collection<GridMember> |
getRackCountMembers(String rack)
Gets the rack count members.
|
abstract SatisfyStateData |
getSatisfyState()
Gets the satisfy state.
|
Integer |
getVirtualCores()
Gets the virtual cores.
|
GridMember |
removeMember(GridMember member)
Removes the member.
|
void |
setConfiguration(Configuration configuration)
Sets the hadoop configuration.
|
void |
setMemory(Integer memory)
Sets the memory.
|
void |
setPriority(Integer priority)
Sets the priority.
|
void |
setProjectionData(ProjectionData data)
Sets the projection data.
|
void |
setVirtualCores(Integer virtualCores)
Sets the virtual cores.
|
public AbstractGridProjection()
public AbstractGridProjection(Configuration configuration)
configuration - the hadoop configurationpublic 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 Integer getPriority()
getPriority in interface GridProjectionpublic void setPriority(Integer priority)
priority - the new prioritypublic void setVirtualCores(Integer virtualCores)
virtualCores - the new virtual corespublic Integer getVirtualCores()
public void setMemory(Integer memory)
memory - the new memorypublic 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(String host)
host - the hostprotected int getRackCount(String rack)
rack - the rackprotected int getAnyCount()
protected Collection<GridMember> getHostCountMembers(String host)
host - the hostprotected void addHostCountMember(String host, GridMember member)
host - the hostmember - the grid memberprotected void addRackCountMember(String rack, GridMember member)
rack - the rackmember - the grid memberprotected Collection<GridMember> getRackCountMembers(String rack)
rack - the rackprotected Collection<GridMember> getAnyCountMembers()
protected Set<String> getHostCountHosts()
protected Set<String> getRackCountHosts()
public void setConfiguration(Configuration configuration)
configuration - the new hadoop configurationpublic Configuration getConfiguration()
protected boolean canFit(GridMember member)
member - the grid member