public final class EvaluatorContext extends Object implements ActiveContext
| Constructor and Description |
|---|
EvaluatorContext(String contextIdentifier,
String evaluatorIdentifier,
EvaluatorDescriptor evaluatorDescriptor,
Optional<String> parentID,
ConfigurationSerializer configurationSerializer,
ContextControlHandler contextControlHandler,
EvaluatorMessageDispatcher messageDispatcher,
ExceptionCodec exceptionCodec,
ContextRepresenters contextRepresenters) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
ClosedContext |
getClosedContext(ActiveContext parentContext) |
EvaluatorDescriptor |
getEvaluatorDescriptor() |
String |
getEvaluatorId() |
FailedContext |
getFailedContext(ReefServiceProtos.ContextStatusProto contextStatusProto) |
FailedContext |
getFailedContextForEvaluatorFailure() |
String |
getId()
Returns an identifier of this object
|
Optional<String> |
getParentId() |
boolean |
isRootContext() |
void |
sendMessage(byte[] message)
Send the active context the message, which will be delivered to all registered
ContextMessageHandler, for this context. |
void |
submitContext(Configuration contextConfiguration)
Submit a Context.
|
void |
submitContextAndService(Configuration contextConfiguration,
Configuration serviceConfiguration)
Submit a Context and a Service Configuration.
|
void |
submitTask(Configuration taskConf)
Submits a Task (encoded in the Configuration) for execution.
|
String |
toString() |
public EvaluatorContext(String contextIdentifier, String evaluatorIdentifier, EvaluatorDescriptor evaluatorDescriptor, Optional<String> parentID, ConfigurationSerializer configurationSerializer, ContextControlHandler contextControlHandler, EvaluatorMessageDispatcher messageDispatcher, ExceptionCodec exceptionCodec, ContextRepresenters contextRepresenters)
public void close()
close in interface AutoCloseableclose in interface ActiveContextpublic void sendMessage(byte[] message)
ActiveContextContextMessageHandler, for this context.sendMessage in interface ActiveContextpublic void submitTask(Configuration taskConf)
TaskSubmittablesubmitTask in interface ActiveContextsubmitTask in interface TaskSubmittabletaskConf - the Configuration. See TaskConfiguration for detailspublic void submitContext(Configuration contextConfiguration)
ContextSubmittablesubmitContext in interface ActiveContextsubmitContext in interface ContextSubmittablecontextConfiguration - the Configuration of the EvaluatorContext. See ContextConfiguration for details.public void submitContextAndService(Configuration contextConfiguration, Configuration serviceConfiguration)
ContextSubmittablesubmitContextAndService in interface ActiveContextsubmitContextAndService in interface ContextSubmittablecontextConfiguration - the Configuration of the EvaluatorContext. See ContextConfiguration for details.serviceConfiguration - the Configuration for the Services. See ServiceConfiguration for details.public String getEvaluatorId()
getEvaluatorId in interface ContextBasepublic Optional<String> getParentId()
getParentId in interface ContextBasepublic EvaluatorDescriptor getEvaluatorDescriptor()
getEvaluatorDescriptor in interface ContextBasepublic String getId()
IdentifiablegetId in interface ContextBasegetId in interface Identifiablepublic final ClosedContext getClosedContext(ActiveContext parentContext)
public FailedContext getFailedContextForEvaluatorFailure()
public FailedContext getFailedContext(ReefServiceProtos.ContextStatusProto contextStatusProto)
public boolean isRootContext()
Copyright © 2015 The Apache Software Foundation. All rights reserved.