|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cliftonsnyder.clutch.Agent
com.cliftonsnyder.clutch.mr.Reducer
public class Reducer
a mobile agent representing a reducer
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.cliftonsnyder.clutch.Agent |
|---|
Agent.State |
| Field Summary | |
|---|---|
protected boolean |
newAgent
|
| Fields inherited from class com.cliftonsnyder.clutch.Agent |
|---|
agentState, ancestorList, children, id, level, maxPeers, parent, state |
| Constructor Summary | |
|---|---|
Reducer()
an empty, parameterless constructor; this is necessary if the Reducer object is to "play nice" with ProActive |
|
Reducer(ClutchState state)
constructs a new Reducer object, with maxPeers maximum peers |
|
| Method Summary | |
|---|---|
void |
addNewMapper(Mapper m)
|
Agent |
createAgent(Node newAgentNode,
Node newDataNode)
method to be implemented by subclasses of Agent; this is where the interesting organization of a Clutch network will take place |
boolean |
hasMapper()
|
boolean |
isNew()
determines whether or not the Agent is newly created or is a current member of a Clutch network |
static void |
main(java.lang.String[] args)
|
void |
putReduceTask(ReduceTask task)
|
void |
run()
|
void |
setMapper(Mapper mapper)
|
void |
setNew(boolean newAgent)
|
void |
setState(ClutchState state)
sets the state information for the Agent |
void |
shutdown()
shut down the Agent |
java.lang.String |
status()
gives a String representation of the current status of the Agent |
java.lang.String |
toString()
|
| Methods inherited from class com.cliftonsnyder.clutch.Agent |
|---|
addChild, getAgentState, getAncestorList, getChildren, getHostName, getID, getLevel, getParent, getRef, isRoot, removeChild, removeChild, setAgentState, setAncestorList, setID, setLevel, setMaxPeers, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean newAgent
| Constructor Detail |
|---|
public Reducer()
public Reducer(ClutchState state)
maxPeers - the maximum number of peers that the Reducer will be allowed| Method Detail |
|---|
public static void main(java.lang.String[] args)
args - This main method optionally takes the location of the
Reducer's configuration file as a parameter. If the parameter
is not supplied, the default location of
'$PWD/etc/clutch.properties' is used. If no configuration file
exists at that location, the Reducer will fail since it won't
have any way of knowing what class to use for it's tasks.public void addNewMapper(Mapper m)
public Agent createAgent(Node newAgentNode,
Node newDataNode)
Agent
createAgent in class Agentpublic boolean hasMapper()
public boolean isNew()
Agent
isNew in class Agentpublic void putReduceTask(ReduceTask task)
public void run()
public void setMapper(Mapper mapper)
public void setNew(boolean newAgent)
public void setState(ClutchState state)
Agent
setState in class Agentstate - a ClutchState object with local state information about the
Agentpublic void shutdown()
Agent
shutdown in class Agentpublic java.lang.String status()
Agent
status in class Agentpublic java.lang.String toString()
toString in class Agent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||