ajanta.pattern
Class Set
java.lang.Object
|
+--ajanta.pattern.Pattern
|
+--ajanta.pattern.PatternCollection
|
+--ajanta.pattern.Set
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- public class Set
- extends PatternCollection
This is an unordered list of patterns. The agent
must traverse all these patterns, but the order of traversal is
immaterial, or is determined dynamically by the user-defined
choosePattern method. Hence, This pattern also makes the
plan more robust, since it can order paths based on host availability.
- See Also:
- Serialized Form
Constructor Summary |
Set()
|
Method Summary |
protected ajanta.pattern.Pattern |
chooseNext()
Select next pattern to be executed |
protected int |
choosePattern()
It will determine the location of the next Pattern in the list
by modifying value of current . |
protected int |
next(ajanta.server.AgentEnv host)
it chooses one amongst the list of patterns not yet traversed, and
makes a hop to the next host defined by the chosen pattern. |
protected void |
scan()
An empty method ....can overridden in derived classes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Set
public Set()
next
protected int next(ajanta.server.AgentEnv host)
throws java.net.UnknownHostException
- it chooses one amongst the list of patterns not yet traversed, and
makes a hop to the next host defined by the chosen pattern.
- Specified by:
next
in class Pattern
java.net.UnknownHostException
scan
protected void scan()
- An empty method ....can overridden in derived classes
- Specified by:
scan
in class Pattern
chooseNext
protected ajanta.pattern.Pattern chooseNext()
- Select next pattern to be executed
choosePattern
protected int choosePattern()
- It will determine the location of the next Pattern in the list
by modifying value of current . It is application specific
method and should be appropraitely overridden. Currenyly it provides
sequential order