Interface Worker
- All Superinterfaces:
- com.fishlib.base.log.LogOutputAppendable
public interface Worker
extends com.fishlib.base.log.LogOutputAppendable
Instances of a Worker interface represent Java process running a 
RemoteQueryProcessor
 The Java Process could be an Operating System process, a Docker Container or some other controlled process.
 Workers are created and destroyed by WorkerControl objects.
 
 Worker instances are essentially a Data Object, with getters and setters.  The attributes are parameters and
 settings used by the WorkerControl object that manages the lifecycle of the Worker.
- 
Field SummaryFields Modifier and Type Field Description static StringprocessUser
- 
Method SummaryModifier and Type Method Description FilegetArtifactDirectory()Returns the artifactDirectory of this Workerio.deephaven.enterprise.auth.AuthTokengetAuthToken()Returns the auth token for this WorkerlonggetCancelledTimeNS()Returns the cancelledTimeNS of this WorkerFilegetClientClassDirectory()Returns the clientClassDirectory of this WorkerStringgetClientConnectionAddress()Returns the client connection address this Worker, which could be a hostname, IP, FQDN, service name, endpoint, etc.FilegetCompiledClassDirectory()Returns the compiledClassDirectory of this WorkerStringgetDispatcherHostName()Returns the dispatcherHostName of this WorkerStringgetDispatcherNameForDiscovery()Returns the name of this dispatcher used by etcd for discoveryintgetHeapSizeMB()Returns the heapSizeMB of this Workerio.deephaven.enterprise.dispatcher.client.DispatcherClientConstants.PostedWorkerStatusgetLastPostedStatus()Returns the last posted status for this Worker; Note it can be null if no status posted yet.List<String>getLatestErrorMessages()Returns the last few lines captured from the worker's syserr.StringgetName()Returns the name of this Worker.intgetPid()Returns the pid of this WorkerOptionalIntgetPort(String protocol)Returns the port of this WorkerProcessEventLogFormat2LoggergetProcessEventLogLogger()Returns the processEventLogLogger of this WorkerStringgetProcessInfoId()Returns the unique id of this Worker processdefault StringgetProcessUserName()Returns the system userName which should run this WorkerList<io.deephaven.enterprise.dispatcher.client.WorkerProtocol>getProtocols()The protocol that should be used to communicate with this worker.RemoteProcessingRequestgetRemoteProcessingRequest()Returns the remoteProcessingRequest of this WorkerlonggetTimeToLiveExpiration()Return the worker's TTL expiration (in millis since the epoch).StringgetUserName()Returns the userName of this WorkerStringgetWorkerId()Returns the id of this WorkerStringgetWorkerNonce()Returns the nonce for registering this worker processbooleanimplementsProtocol(String protocol)Does this worker implement a given protocol?booleanisFinished()Returns the isFinished status of this WorkerbooleanisJvmDestroySent()Returns the isJvmDestroySent status of this WorkerbooleanisRegistered()Returns true if this worker is registered.booleanisTerminateRequestSent()Returns the isTerminateRequestSent status of this WorkervoidsetCancelledTimeNS(long cancelledTimeNS)Set the cancelledTimeNS for this workervoidsetJvmDestroySent(boolean jvmDestroySent)Sets the jvmDestroySent status of this WorkervoidsetLastPostedStatus(io.deephaven.enterprise.dispatcher.client.DispatcherClientConstants.PostedWorkerStatus lastPostedStatus)Set the last posted status for this Workerdefault voidsetProcessUserName(String processUserName)Sets a system userName which should run this WorkervoidsetRegistered()Set that this worker is registered.voidsetTerminateRequestSent(boolean terminateRequestSent)Set the terminateRequestSent for this workervoidsetTimeToLive(long ttl)Set the time to live (in millis since the epoch).voidstart()Start theWorker.voidterminate()Terminate theWorker.
- 
Field Details
- 
Method Details- 
startStart theWorker.- Throws:
- WorkerControlStartException- If an error occurs starting the Worker
 
- 
terminatevoid terminate()Terminate theWorker.
- 
getNameString getName()Returns the name of this Worker.- Returns:
- the name of this Worker
 
- 
getWorkerIdString getWorkerId()Returns the id of this Worker- Returns:
- the id of this Worker
 
- 
getProcessInfoIdString getProcessInfoId()Returns the unique id of this Worker process- Returns:
- the unique id of this Worker process
 
- 
getWorkerNonceString getWorkerNonce()Returns the nonce for registering this worker process- Returns:
- the nonce used for registration
 
- 
getUserNameString getUserName()Returns the userName of this Worker- Returns:
- the userName of this Worker
 
- 
setProcessUserNameSets a system userName which should run this Worker- Parameters:
- processUserName- the system user that should run this Worker
 
- 
getProcessUserNameReturns the system userName which should run this Worker- Returns:
- the system userName which should run this Worker
 
- 
getClientClassDirectoryFile getClientClassDirectory()Returns the clientClassDirectory of this Worker- Returns:
- the clientClassDirectory of this Worker.
 
- 
getRemoteProcessingRequestRemoteProcessingRequest getRemoteProcessingRequest()Returns the remoteProcessingRequest of this Worker- Returns:
- the remoteProcessingRequest of this Worker.
 
- 
getHeapSizeMBint getHeapSizeMB()Returns the heapSizeMB of this Worker- Returns:
- the heapSizeMB of this Worker.
 
- 
isRegisteredboolean isRegistered()Returns true if this worker is registered.
- 
setRegisteredvoid setRegistered()Set that this worker is registered.
- 
getPortReturns the port of this Worker- Returns:
- the port of this Worker
 
- 
getClientConnectionAddressString getClientConnectionAddress()Returns the client connection address this Worker, which could be a hostname, IP, FQDN, service name, endpoint, etc. Clients will connect to the the Worker via ClientConnectionAddress:Port- Returns:
- the clientConnectionAddress of this Worker
 
- 
getPidint getPid()Returns the pid of this Worker- Returns:
- the pid of this Worker
 
- 
isFinishedboolean isFinished()Returns the isFinished status of this Worker- Returns:
- the isFinished status of this Worker
 
- 
getCompiledClassDirectoryFile getCompiledClassDirectory()Returns the compiledClassDirectory of this Worker- Returns:
- the compiledClassDirectory of this Worker
 
- 
getArtifactDirectoryFile getArtifactDirectory()Returns the artifactDirectory of this Worker- Returns:
- the artifactDirectory of this Worker
 
- 
getAuthTokenio.deephaven.enterprise.auth.AuthToken getAuthToken()Returns the auth token for this Worker
- 
getCancelledTimeNSlong getCancelledTimeNS()Returns the cancelledTimeNS of this Worker- Returns:
- the cancelledTimeNS of this Worker
 
- 
getLastPostedStatusio.deephaven.enterprise.dispatcher.client.DispatcherClientConstants.PostedWorkerStatus getLastPostedStatus()Returns the last posted status for this Worker; Note it can be null if no status posted yet.- Returns:
- the last posted status for this Worker
 
- 
setCancelledTimeNSvoid setCancelledTimeNS(long cancelledTimeNS)Set the cancelledTimeNS for this worker- Parameters:
- cancelledTimeNS- the port for this worker
 
- 
isTerminateRequestSentboolean isTerminateRequestSent()Returns the isTerminateRequestSent status of this Worker- Returns:
- the isTerminateRequestSent status of this Worker
 
- 
setTerminateRequestSentvoid setTerminateRequestSent(boolean terminateRequestSent)Set the terminateRequestSent for this worker- Parameters:
- terminateRequestSent- status for this worker
 
- 
isJvmDestroySentboolean isJvmDestroySent()Returns the isJvmDestroySent status of this Worker- Returns:
- the isJvmDestroySent status of this Worker
 
- 
setJvmDestroySentvoid setJvmDestroySent(boolean jvmDestroySent)Sets the jvmDestroySent status of this Worker- Parameters:
- jvmDestroySent- status of this Worker
 
- 
getProcessEventLogLoggerProcessEventLogFormat2Logger getProcessEventLogLogger()Returns the processEventLogLogger of this Worker- Returns:
- the processEventLogLogger of this Worker
 
- 
getDispatcherHostNameString getDispatcherHostName()Returns the dispatcherHostName of this Worker- Returns:
- the dispatcherHostName of this Worker
 
- 
getDispatcherNameForDiscoveryString getDispatcherNameForDiscovery()Returns the name of this dispatcher used by etcd for discovery- Returns:
- the discovery name for this dispatcher
 
- 
getProtocolsList<io.deephaven.enterprise.dispatcher.client.WorkerProtocol> getProtocols()The protocol that should be used to communicate with this worker. Values that are currently defined are "Enterprise", "EnterpriseWebsocket" or "Community", but the dispatcher itself does not care, it just passes it to the client- Returns:
- the protocols that the worker implement
 
- 
implementsProtocolDoes this worker implement a given protocol?
- 
getLatestErrorMessagesReturns the last few lines captured from the worker's syserr.- Returns:
- the last few lines from the worker's syserr
 
- 
getTimeToLiveExpirationlong getTimeToLiveExpiration()Return the worker's TTL expiration (in millis since the epoch).- Returns:
- the maximum time that the worker has renewed it's TTL
 
- 
setTimeToLivevoid setTimeToLive(long ttl)Set the time to live (in millis since the epoch).
- 
setLastPostedStatusvoid setLastPostedStatus(io.deephaven.enterprise.dispatcher.client.DispatcherClientConstants.PostedWorkerStatus lastPostedStatus)Set the last posted status for this Worker
 
-