public abstract class GroovyScalingPolicy extends com.bytex.snamp.scripting.groovy.Scriptlet implements ScalingPolicy, com.bytex.snamp.Aggregator
VOICELESS| Constructor and Description |
|---|
GroovyScalingPolicy() |
| Modifier and Type | Method and Description |
|---|---|
com.bytex.snamp.Aggregator |
compose(com.bytex.snamp.Aggregator other) |
double |
evaluate(ScalingPolicyEvaluationContext context)
Evaluates scaling policy and obtain vote weight.
|
protected ScalingPolicyEvaluationContext |
getContext() |
Object |
getProperty(String property) |
Set<String> |
getResources() |
<T> Optional<T> |
queryObject(Class<T> objectType) |
void |
reset()
Resets internal state of the object.
|
addNotificationListener, addNotificationListener, getCommunicator, getLogger, getResourceAttribute, getResourceAttributeInfo, getResourceConfiguration, getResourceNotificationInfo, invokeDslStatement, isActiveClusterNode, removeNotificationListener, setBundleContext, setResourceAttributeevaluate, evaluate, getBinding, invokeMethod, print, printf, printf, println, println, run, run, setBinding, setPropertyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic void reset()
reset in interface com.bytex.snamp.Statefulpublic final Set<String> getResources()
getResources in interface com.bytex.snamp.scripting.groovy.ScriptingAPIgetResources in class com.bytex.snamp.scripting.groovy.Scriptletpublic final Object getProperty(String property)
getProperty in interface groovy.lang.GroovyObjectgetProperty in class groovy.lang.Scriptprotected final ScalingPolicyEvaluationContext getContext()
public final double evaluate(ScalingPolicyEvaluationContext context)
ScalingPolicycontext - An object containing all necessary data for voting.public final <T> Optional<T> queryObject(@Nonnull Class<T> objectType)
queryObject in interface com.bytex.snamp.AggregatorCopyright © 2015–2017 Bytex Solutions. All rights reserved.