public abstract class SelectionManager extends Object
Modifier and Type | Field and Description |
---|---|
protected HashSet<String> |
authorizedSelectionScripts |
Constructor and Description |
---|
SelectionManager() |
SelectionManager(RMCore rmcore) |
Modifier and Type | Method and Description |
---|---|
abstract List<RMNode> |
arrangeNodesForScriptExecution(List<RMNode> nodes,
List<SelectionScript> scripts,
Map<String,Serializable> bindings)
Arranges nodes for script execution based on some criteria for example
previous execution statistics.
|
<T> List<ScriptResult<T>> |
executeScript(Script<T> script,
Collection<RMNode> nodes,
Map<String,Serializable> bindings) |
abstract boolean |
isPassed(SelectionScript script,
Map<String,Serializable> bindings,
RMNode rmnode)
Predicts script execution result.
|
abstract boolean |
processScriptResult(SelectionScript script,
Map<String,Serializable> bindings,
ScriptResult<Boolean> scriptResult,
RMNode rmnode)
Processes script result and updates knowledge base of selection manager
at the same time.
|
void |
scriptExecutionFinished(String nodeUrl)
Indicates that script execution is finished for the node with specified
url.
|
NodeSet |
selectNodes(Criteria criteria,
Client client) |
void |
shutdown()
Handles shut down of the selection manager
|
void |
updateAuthorizedScriptsSignatures()
Loads authorized selection scripts.
|
public SelectionManager()
public SelectionManager(RMCore rmcore)
public void updateAuthorizedScriptsSignatures()
public abstract List<RMNode> arrangeNodesForScriptExecution(List<RMNode> nodes, List<SelectionScript> scripts, Map<String,Serializable> bindings)
nodes
- - nodes list for script executionscripts
- - set of selection scriptspublic abstract boolean isPassed(SelectionScript script, Map<String,Serializable> bindings, RMNode rmnode)
script
- - script to executermnode
- - target nodepublic abstract boolean processScriptResult(SelectionScript script, Map<String,Serializable> bindings, ScriptResult<Boolean> scriptResult, RMNode rmnode)
script
- - executed scriptscriptResult
- - obtained script resultrmnode
- - node on which script has been executedpublic <T> List<ScriptResult<T>> executeScript(Script<T> script, Collection<RMNode> nodes, Map<String,Serializable> bindings)
public void scriptExecutionFinished(String nodeUrl)
public void shutdown()