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 AutoCloseable
close
in interface ActiveContext
public void sendMessage(byte[] message)
ActiveContext
ContextMessageHandler
, for this context.sendMessage
in interface ActiveContext
public void submitTask(Configuration taskConf)
TaskSubmittable
submitTask
in interface ActiveContext
submitTask
in interface TaskSubmittable
taskConf
- the Configuration. See TaskConfiguration for detailspublic void submitContext(Configuration contextConfiguration)
ContextSubmittable
submitContext
in interface ActiveContext
submitContext
in interface ContextSubmittable
contextConfiguration
- the Configuration of the EvaluatorContext. See ContextConfiguration for details.public void submitContextAndService(Configuration contextConfiguration, Configuration serviceConfiguration)
ContextSubmittable
submitContextAndService
in interface ActiveContext
submitContextAndService
in interface ContextSubmittable
contextConfiguration
- 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 ContextBase
public Optional<String> getParentId()
getParentId
in interface ContextBase
public EvaluatorDescriptor getEvaluatorDescriptor()
getEvaluatorDescriptor
in interface ContextBase
public String getId()
Identifiable
getId
in interface ContextBase
getId
in interface Identifiable
public 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.