Class CommunityPersistentQueryHandle
java.lang.Object
com.illumon.iris.controller.handle.CommunityPersistentQueryHandle
- All Implemented Interfaces:
PersistentQueryHandle
A Handle to a Persistent Query backed by an Enterprise worker.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final PersistentQueryConfigurationprotected final ControllerConfigurationTypeprotected final PersistentQueryDbServerConfigprotected final com.fishlib.net.ConnectionMonitor.Paramsprotected final PublicPrivateKeyEncryptionprotected final ThreadPoolExecutorprotected final ScriptPathLoaderprotected final com.fishlib.io.logger.Loggerstatic final intprotected final PersistentQueryState -
Constructor Summary
ConstructorsConstructorDescriptionCommunityPersistentQueryHandle(com.fishlib.io.logger.Logger log, Object queryHandleContext) Create a new Handle for an enterprise worker. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected WorkerHandlecreateWorkerHandle(RemoteProcessingRequest request, QueryDispatcherConnection dispatcherConnection) protected voidensureShutdown(boolean awaitDisconnection) protected StringgetState()Get the current state object for the Persistent Query.longGet the currently running version of the Persistent Query.protected booleanmaybeSetTerminalStatus(Supplier<PersistentQueryState.Status> statusSupplier) protected booleanonDispatcherConnected(QueryDispatcherConnection dispatcherConnection) protected voidprotected voidprotected voidprotected voidprotected voidvoidShutdown the worker, if it is running.voidstart()Start the worker.
-
Field Details
-
MAX_INBOUND_MESSAGE_SIZE
public static final int MAX_INBOUND_MESSAGE_SIZE -
log
@NotNull protected final com.fishlib.io.logger.Logger log -
configurationType
-
config
-
loader
-
dbServerConfig
-
state
-
dispatcherConnectionMonitorParams
protected final com.fishlib.net.ConnectionMonitor.Params dispatcherConnectionMonitorParams -
executorService
-
encryption
-
workerRequestHandle
-
-
Constructor Details
-
CommunityPersistentQueryHandle
public CommunityPersistentQueryHandle(@NotNull com.fishlib.io.logger.Logger log, @NotNull Object queryHandleContext) Create a new Handle for an enterprise worker.- Parameters:
log- the log.queryHandleContext- A context object containing the required parameters for this object.
-
-
Method Details
-
onStartRequested
protected void onStartRequested() -
onDispatcherConnected
-
createWorkerHandle
protected WorkerHandle createWorkerHandle(RemoteProcessingRequest request, QueryDispatcherConnection dispatcherConnection) -
getVersion
public long getVersion()Description copied from interface:PersistentQueryHandleGet the currently running version of the Persistent Query.- Specified by:
getVersionin interfacePersistentQueryHandle- Returns:
- the version of the running query
-
getState
Description copied from interface:PersistentQueryHandleGet the current state object for the Persistent Query.- Specified by:
getStatein interfacePersistentQueryHandle- Returns:
- the current state
-
start
public void start()Description copied from interface:PersistentQueryHandleStart the worker.- Specified by:
startin interfacePersistentQueryHandle
-
shutdown
Description copied from interface:PersistentQueryHandleShutdown the worker, if it is running.- Specified by:
shutdownin interfacePersistentQueryHandle- Parameters:
lastAuthenticatedUser- the authenticating user requesting the shutdownlastEffectiveUser- the effective user requesting the shuutdown
-
ensureShutdown
protected void ensureShutdown(boolean awaitDisconnection) - Parameters:
awaitDisconnection- Used to communicate whether we need to care further about ensuring disconnection, or not. If true, we block until interrupted or until another thread calls ensureShutdown(false). If false, we're asserting that the DB is already disconnected, or that we don't care (because no script was run yet).
-
checkQueryTerminatingOrTerminal
protected boolean checkQueryTerminatingOrTerminal() -
maybeSetTerminalStatus
-
onError
-
onFailure
-
onFailure
-
publishState
protected void publishState() -
getScriptCode
-