Class CommunityPersistentQueryHandle
java.lang.Object
com.illumon.iris.controller.handle.PersistentQueryHandleBase
com.illumon.iris.controller.handle.CommunityPersistentQueryHandle
- All Implemented Interfaces:
PersistentQueryHandle
A Handle to a Persistent Query backed by a Core+ worker.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal class
-
Field Summary
FieldsFields inherited from class com.illumon.iris.controller.handle.PersistentQueryHandleBase
config, configurationType, dispatcherConnectionHandler, encryption, executorService, groupProvider, loader, log, logPrefix, state, stateLock, workerProcessInfoId, workerRequestHandle
-
Constructor Summary
ConstructorsConstructorDescriptionCommunityPersistentQueryHandle
(com.fishlib.io.logger.Logger log, Object queryHandleContext) Create a new Handle for an enterprise worker. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Check whether the class of this object can attempt to restore already running workers.static Map<String,
ExportedObjectInfo> convertChanges
(io.deephaven.client.impl.script.Changes changes) protected WorkerHandle
createWorkerHandle
(RemoteProcessingRequest request, QueryDispatcherConnection dispatcherConnection) getObjectGroups
(io.deephaven.proto.pqworker.grpc.PQWorkerApiGrpc.PQWorkerApiStub api, Map<String, ExportedObjectInfo> scopeNamesAndTypes) protected boolean
onDispatcherConnected
(QueryDispatcherConnection dispatcherConnection) protected void
boolean
restore
(PersistentQueryState oldState, long deadlineMillis) Recreate a worker handle for an existing worker.static void
Methods inherited from class com.illumon.iris.controller.handle.PersistentQueryHandleBase
checkQueryTerminatingOrTerminal, ensureShutdown, errorLog, getScriptCode, getState, getStateLock, getVersion, getWorkerHandle, infoLog, maybeSetTerminalStatus, onError, onFailure, onFailure, publishState, restore, setReplicaSlot, shutdown, start, warnLog
-
Field Details
-
MAX_INBOUND_MESSAGE_SIZE
public static final int MAX_INBOUND_MESSAGE_SIZE
-
-
Constructor Details
-
CommunityPersistentQueryHandle
public CommunityPersistentQueryHandle(@NotNull com.fishlib.io.logger.Logger log, @NotNull Object queryHandleContext) Create a new Handle for an enterprise worker. After creating a handle, eitherstart()
should be called, in the case of a new worker, orrestore()
should be called, in the case of a pre-existing worker orphan that is being re-parented.- Parameters:
log
- the log.queryHandleContext
- A context object containing the required parameters for this object.
-
-
Method Details
-
shutdownExecutors
public static void shutdownExecutors() -
onStartRequested
protected void onStartRequested()- Specified by:
onStartRequested
in classPersistentQueryHandleBase
-
onDispatcherConnected
- Specified by:
onDispatcherConnected
in classPersistentQueryHandleBase
-
canTryToRestore
public boolean canTryToRestore()Description copied from interface:PersistentQueryHandle
Check whether the class of this object can attempt to restore already running workers.- Returns:
- true if the class of this object can attempt to restore an already running worker
-
restore
Recreate a worker handle for an existing worker.- Parameters:
oldState
- the state of the existing workerdeadlineMillis
- when (in millis since the epoch) the worker must be restored by, or we should give up- Returns:
- true if the worker handle was restored successfully, false otherwise.
-
createWorkerHandle
protected WorkerHandle createWorkerHandle(RemoteProcessingRequest request, QueryDispatcherConnection dispatcherConnection) - Specified by:
createWorkerHandle
in classPersistentQueryHandleBase
-
convertChanges
public static Map<String,ExportedObjectInfo> convertChanges(io.deephaven.client.impl.script.Changes changes) -
getObjectGroups
public static Map<String,String[]> getObjectGroups(io.deephaven.proto.pqworker.grpc.PQWorkerApiGrpc.PQWorkerApiStub api, Map<String, ExportedObjectInfo> scopeNamesAndTypes) throws ExecutionException, InterruptedException
-