Class SimpleWorkerInstance
java.lang.Object
dev.getelements.elements.rt.remote.SimpleInstance
dev.getelements.elements.rt.remote.SimpleWorkerInstance
- All Implemented Interfaces:
Instance
,Worker
,AutoCloseable
Contains all
Node
instances for several Node
instances and manages their life cycles therein. This
imposes the additional requirement of providing some form of InstanceConnectionService
to route internal
requests.-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.getelements.elements.rt.remote.Worker
Worker.Accessor, Worker.Mutator
-
Field Summary
Fields inherited from class dev.getelements.elements.rt.remote.SimpleInstance
instanceId
Fields inherited from interface dev.getelements.elements.rt.remote.Instance
EXECUTOR_SERVICE, SCHEDULED_EXECUTOR_SERVICE, THREAD_GROUP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOpens anWorker.Accessor
which can be used to read the run-state of thisWorker
.Opens aWorker.Mutator
which can be used to modify the run-state of thisWorker
.Gets this instancesInstanceId
protected void
protected void
protected void
protected void
void
setInstanceId
(InstanceId instanceId) void
setMasterNode
(Node masterNode) void
setNodeFactory
(Node.Factory nodeFactory) void
setNodeSet
(Set<Node> nodeSet) void
setPersistenceEnvironment
(PersistenceEnvironment persistenceEnvironment) Methods inherited from class dev.getelements.elements.rt.remote.SimpleInstance
close, getAsyncConnectionService, getInstanceConnectionService, getInstanceDiscoveryService, getRemoteInvokerRegistry, refreshConnections, setAsyncConnectionService, setInstanceConnectionService, setInstanceDiscoveryService, setRemoteInvokerRegistry, start
-
Constructor Details
-
SimpleWorkerInstance
public SimpleWorkerInstance()
-
-
Method Details
-
getInstanceId
Description copied from interface:Instance
Gets this instancesInstanceId
- Specified by:
getInstanceId
in interfaceInstance
- Overrides:
getInstanceId
in classSimpleInstance
- Returns:
- the
InstanceId
-
preStart
- Overrides:
preStart
in classSimpleInstance
-
postStart
- Overrides:
postStart
in classSimpleInstance
-
preClose
- Overrides:
preClose
in classSimpleInstance
-
postClose
- Overrides:
postClose
in classSimpleInstance
-
accessWorkerState
Description copied from interface:Worker
Opens anWorker.Accessor
which can be used to read the run-state of thisWorker
.- Specified by:
accessWorkerState
in interfaceWorker
- Returns:
- the
Worker.Accessor
-
beginMutation
Description copied from interface:Worker
Opens aWorker.Mutator
which can be used to modify the run-state of thisWorker
.- Specified by:
beginMutation
in interfaceWorker
- Returns:
- the
Worker.Mutator
-
getNodeSet
-
getPersistenceEnvironment
-
setPersistenceEnvironment
-
setNodeSet
-
getMasterNode
-
setMasterNode
@Inject public void setMasterNode(@Named("dev.getelements.elements.rt.node.master") Node masterNode) -
setInstanceId
- Overrides:
setInstanceId
in classSimpleInstance
-
getNodeFactory
-
setNodeFactory
-