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, loader, log, logPrefix, state, workerRequestHandle -
Constructor Summary
ConstructorsConstructorDescriptionCommunityPersistentQueryHandle(com.fishlib.io.logger.Logger log, Object queryHandleContext) Create a new Handle for an enterprise worker. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck whether the class of this object can attempt to restore already running workers.protected WorkerHandlecreateWorkerHandle(RemoteProcessingRequest request, QueryDispatcherConnection dispatcherConnection) protected booleanonDispatcherConnected(QueryDispatcherConnection dispatcherConnection) protected voidbooleanrestore(PersistentQueryState oldState) Recreate a worker handle for an existing worker.Methods inherited from class com.illumon.iris.controller.handle.PersistentQueryHandleBase
checkQueryTerminatingOrTerminal, ensureShutdown, getScriptCode, getState, getVersion, getWorkerHandle, maybeSetTerminalStatus, onError, onFailure, onFailure, publishState, restore, shutdown, start
-
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
-
onStartRequested
protected void onStartRequested()- Specified by:
onStartRequestedin classPersistentQueryHandleBase
-
onDispatcherConnected
- Specified by:
onDispatcherConnectedin classPersistentQueryHandleBase
-
canTryToRestore
public boolean canTryToRestore()Description copied from interface:PersistentQueryHandleCheck 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 worker- Returns:
- true if the worker handle was restored successfully, false otherwise.
-
createWorkerHandle
protected WorkerHandle createWorkerHandle(RemoteProcessingRequest request, QueryDispatcherConnection dispatcherConnection) - Specified by:
createWorkerHandlein classPersistentQueryHandleBase
-