Class RemoteQueryClient
java.lang.Object
com.illumon.iris.db.tables.remotequery.RemoteQueryClient
- All Implemented Interfaces:
com.fishlib.dataobjects.HashCommandConstants,com.fishlib.net.api.CommandHandler,com.fishlib.net.BaseCommandConstants,RemoteQueryCommandConstants
public class RemoteQueryClient extends Object implements com.fishlib.net.api.CommandHandler, RemoteQueryCommandConstants
Interface for remotely connecting to Deephaven.
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_WORKER_PRIORITYThe default priority of a worker, for when it's not overridden (for example by the query type).Fields inherited from interface com.fishlib.net.BaseCommandConstants
PING, PONG, REGISTER_QUEUE_LISTENER, RESPONSEFields inherited from interface com.fishlib.dataobjects.HashCommandConstants
HASHTABLE_CLEAR, HASHTABLE_GET_ALL_ENTRIES, HASHTABLE_GET_KEYS, HASHTABLE_PUT, HASHTABLE_PUTALL, HASHTABLE_REMOVE, HASHTABLE_REMOVEALL, HASHTABLE_SUBSCRIBE, HASHTABLE_UNSUBSCRIBEFields inherited from interface com.illumon.iris.db.RemoteQueryCommandConstants
CANCEL_REMOTE_QUERY, CURRENT_HEAP_UPDATE, GET_TABLE_PARTITION_ID, LOG_BUFFER_RECORD, LOG_BUFFER_SUBSCRIPTION, MAXIMUM_HEAP_REQUEST, PROGRESS_UPDATE, REGISTER, REMOTE_QUERY_CONCURRENT, REMOTE_QUERY_DISPATCHER_ADD_JOB, REMOTE_QUERY_DISPATCHER_ADMIN_COMMAND, REMOTE_QUERY_DISPATCHER_CANCEL_JOB, REMOTE_QUERY_DISPATCHER_PUSH_CLASSES, REMOTE_QUERY_FATAL_ERROR, REMOTE_QUERY_GET_SCOPE_VAR, REMOTE_QUERY_METHOD_CALL, REMOTE_QUERY_PREEMPTIVE_TABLE_DELTA, REMOTE_QUERY_PREEMPTIVE_TABLE_SNAPSHOT, REMOTE_QUERY_PREEMPTIVE_TABLE_SUBSCRIPTION, REMOTE_QUERY_PROCESSOR_TERMINATE, REMOTE_QUERY_RELEASE_REFERENCE, REMOTE_QUERY_SERIAL, REMOTE_QUERY_TABLE_ERROR, REMOTE_TABLE_HANDLE_CREATE, REMOTE_TABLE_HANDLE_UPDATE, REMOTE_TABLE_MAP_KEY_ADDITION, REMOTE_TABLE_MAP_RELEASE, RTLM_CREATE_LOGGER, RTLM_DELETE_TABLE, SUBSCRIBE_USAGE_UPDATES, UNUSED_REMOTE_QUERY_GET_TABLE_SEGMENT_BLOCK_ASYNC -
Constructor Summary
Constructors Constructor Description RemoteQueryClient()Create a new Deephaven dispatcher connection.RemoteQueryClient(com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams)Create a new Deephaven dispatcher connection.RemoteQueryClient(String serverHost, int serverPort)Create a RemoteQueryClient and connect it to the RemoteQueryDispatcher.RemoteQueryClient(String serverHost, int serverPort, com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams)Create a RemoteQueryClient and connect it to the RemoteQueryDispatcher.RemoteQueryClient(String serverHost, int serverPort, com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams, com.fishlib.auth.WAuthenticationClientManager authenticationClientManager)Create a RemoteQueryClient and connect it to the RemoteQueryDispatcher. -
Method Summary
Modifier and Type Method Description static List<RemoteQueryClassDefinition>buildClassList(Class<?>... classes)static List<RemoteQueryClassDefinition>buildClassList(List<RemoteQueryClassDefinition> classList, Class<?>... classes)static QueryProcessorConnectionconnectToExistingProcessor(com.fishlib.io.logger.Logger log, com.fishlib.auth.AuthToken authToken, int port, String hostName, int webSocketPort, String envoyPrefix, String workerId, String processInfoId, QueryProcessorConnection.DisconnectHandler disconnectHandler, com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams, boolean combineWorkerConnectionStats, com.fishlib.auth.WAuthenticationClientManager authenticationClientManager)static QueryProcessorConnectionconnectToExistingProcessor(com.fishlib.io.logger.Logger log, com.fishlib.auth.AuthToken authToken, int port, String hostName, String workerId, String processInfoId, QueryProcessorConnection.DisconnectHandler disconnectHandler, com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams)static QueryProcessorConnectionconnectToExistingProcessor(com.fishlib.io.logger.Logger log, com.fishlib.auth.AuthToken authToken, int port, String hostName, String workerId, String processInfoId, QueryProcessorConnection.DisconnectHandler disconnectHandler, com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams, com.fishlib.auth.WAuthenticationClientManager authenticationClientManager)static QueryProcessorConnectionconnectToNewProcessor(com.fishlib.io.logger.Logger log, QueryDispatcherConnection dispatcherConnection, com.fishlib.auth.AuthToken authToken, QueryDispatcherConnection.QueryProcessorRequestHandle handle, QueryProcessorConnection.DisconnectHandler disconnectHandler, com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams, com.fishlib.auth.WAuthenticationClientManager authenticationClientManager, String[] classpath, int priority, int maxHeapSizeMb, String queryDescription, boolean debug, boolean detailedGCLogging, boolean omitDefaultGcParameters, boolean exportQueryScope, List<RemoteQueryClassDefinition> classPushList, Map<String,String> extraEnvironmentVars, String... jvmArgs)static QueryProcessorConnectionconnectToNewProcessor(com.fishlib.io.logger.Logger log, QueryDispatcherConnection dispatcherConnection, com.fishlib.auth.AuthToken authToken, QueryDispatcherConnection.QueryProcessorRequestHandle handle, QueryProcessorConnection.DisconnectHandler disconnectHandler, com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams, com.fishlib.auth.WAuthenticationClientManager authenticationClientManager, String[] classpath, int maxHeapSizeMb, String queryDescription, boolean debug, boolean detailedGCLogging, boolean omitDefaultGcParameters, boolean exportQueryScope, List<RemoteQueryClassDefinition> classPushList, Map<String,String> extraEnvironmentVars, String... jvmArgs)Delegate toconnectToNewProcessor(Logger, QueryDispatcherConnection, AuthToken, QueryDispatcherConnection.QueryProcessorRequestHandle, QueryProcessorConnection.DisconnectHandler, ConnectionMonitor.Params, WAuthenticationClientManager, String[], int, int, String, boolean, boolean, boolean, boolean, List, Map, String...)with a worker priority ofDEFAULT_WORKER_PRIORITY.static List<RemoteQueryClassDefinition>getClassPushList(String resourceName)static String[]getDefaultClassPathList()static List<RemoteQueryClassDefinition>getDefaultClassPushList()static List<String>getExtraJvmArgs(boolean debug, int debuggerPort, String[] jvmArgs)RemoteDatabasegetRemoteDB()Creates a Database object that communicates with a remote query worker.RemoteDatabasegetRemoteDB(int maxHeapSizeMb)Creates a Database object that communicates with a remote query worker.RemoteDatabasegetRemoteDB(int maxHeapSizeMb, String description, boolean debug, String... jvmArgs)RemoteDatabasegetRemoteDB(int maxHeapSizeMb, String description, boolean debug, Map<String,String> extraEnvironmentVars, String... jvmArgs)RemoteDatabasegetRemoteDB(int maxHeapSizeMb, String jvmProfileName, String... extraJvmArgs)RemoteDatabasegetRemoteDB(com.fishlib.auth.AuthToken authToken, QueryDispatcherConnection.QueryProcessorRequestHandle handle, QueryProcessorConnection.DisconnectHandler disconnectHandler, com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams, com.fishlib.auth.WAuthenticationClientManager authenticationClientManager, String[] classpath, int maxHeapSizeMb, String queryDescription, boolean debug, boolean detailedGCLogging, boolean omitDefaultGcParameters, List<RemoteQueryClassDefinition> classPushList, Map<String,String> extraEnvironmentVars, String... jvmArgs)RemoteDatabasegetRemoteDB(com.fishlib.auth.AuthToken authToken, QueryDispatcherConnection.QueryProcessorRequestHandle handle, QueryProcessorConnection.DisconnectHandler disconnectHandler, com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams, com.fishlib.auth.WAuthenticationClientManager authenticationClientManager, String[] classpath, int maxHeapSizeMb, String queryDescription, boolean debug, boolean detailedGCLogging, List<RemoteQueryClassDefinition> classPushList, Map<String,String> extraEnvironmentVars, String... jvmArgs)RemoteDatabasegetRemoteDB(com.fishlib.auth.WAuthenticationClientManager authenticationClientManager, int maxHeapSizeMb, String description, boolean debug, Map<String,String> extraEnvironmentVars, String... jvmArgs)voidhandleClientDeath(com.fishlib.net.api.ClientEntry client)voidhandleCommand(com.fishlib.net.api.ClientEntry client, com.fishlib.base.Command comm)booleanisConnected()voidpushClasses(Class<?>... classes)Pushes classes to the dispatcher for later use when processing queries.<T> TsendNewQuery(RemoteQuery<T> remoteQuery, int processorHeapMB, long maxDurationMS, Class<?>... additionalClasses)Requests a query processor from the dispatcher, and sends a query to the processor for execution.<T> TsendNewQuery(RemoteQuery<T> remoteQuery, long workerAcquisitionTimeoutMillis, Class<?>... additionalClasses)Requests a query processor from the dispatcher, and sends a query to the processor for execution.<T> TsendNewQuery(RemoteQuery<T> remoteQuery, RemoteProcessingRequest request, long workerAcquisitionTimeoutMillis, Class<?>... additionalClasses)Requests a query processor from the dispatcher, and sends a query to the processor for execution.<T> TsendNewQuery(RemoteQuery<T> remoteQuery, RemoteProcessingRequest request, Class<?>... additionalClasses)Requests a query processor from the dispatcher, and sends a query to the processor for execution.<T> TsendNewQuery(RemoteQuery<T> remoteQuery, Class<?>... additionalClasses)Requests a query processor from the dispatcher, and sends a query to the processor for execution.<T> TsendQuery(RemoteQuery<T> remoteQuery, int processorHeapMB, long maxDurationMS, long workerAcquisitionTimeoutMillis, Class<?>... additionalClasses)Requests a query processor from the dispatcher, and sends a query to the processor for execution.<T> TsendQuery(RemoteQuery<T> remoteQuery, int processorHeapMB, long maxDurationMS, Class<?>... additionalClasses)Requests a query processor from the dispatcher, and sends a query to the processor for execution.<T> TsendQuery(RemoteQuery<T> remoteQuery, long workerAcquisitionTimeoutMillis, Class<?>... additionalClasses)Requests a query processor from the dispatcher, and sends a query to the processor for execution.<T> TsendQuery(RemoteQuery<T> remoteQuery, RemoteProcessingRequest request, long workerAcquisitionTimeoutMillis, Class<?>... additionalClasses)Requests a query processor from the dispatcher, and sends a query to the processor for execution.<T> TsendQuery(RemoteQuery<T> remoteQuery, RemoteProcessingRequest request, Class<?>... additionalClasses)Requests a query processor from the dispatcher, and sends a query to the processor for execution.<T> TsendQuery(RemoteQuery<T> remoteQuery, Class<?>... additionalClasses)Requests a query processor from the dispatcher, and sends a query to the processor for execution.
-
Field Details
-
DEFAULT_WORKER_PRIORITY
public static final int DEFAULT_WORKER_PRIORITYThe default priority of a worker, for when it's not overridden (for example by the query type). Lower numbers are higher priorities, with 0 as the highest. Negative numbers are not allowed.
-
-
Constructor Details
-
RemoteQueryClient
Create a new Deephaven dispatcher connection. The default host and port are selected using the RemoteQueryDispatcherParameters.host and RemoteQueryDispatcherParameters.queryPort properties.- Throws:
IOException- if an error occurred connecting to the RemoteQueryDispatcher
-
RemoteQueryClient
public RemoteQueryClient(@Nullable com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams) throws IOExceptionCreate a new Deephaven dispatcher connection. The default host and port are selected using the RemoteQueryDispatcherParameters.host and RemoteQueryDispatcherParameters.queryPort properties.- Parameters:
connectionMonitorParams- heartbeat and idle monitoring parameters- Throws:
IOException- if an error occurred connecting to the RemoteQueryDispatcher
-
RemoteQueryClient
Create a RemoteQueryClient and connect it to the RemoteQueryDispatcher.- Parameters:
serverHost- the hostname of the RemoteQueryDispatcherserverPort- the port of the RemoteQueryDispatcher- Throws:
IOException- if an error occurred connecting to the RemoteQueryDispatcher
-
RemoteQueryClient
public RemoteQueryClient(String serverHost, int serverPort, @Nullable com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams) throws IOExceptionCreate a RemoteQueryClient and connect it to the RemoteQueryDispatcher. Uses the default authentication client manager.- Parameters:
serverHost- the hostname of the RemoteQueryDispatcherserverPort- the port of the RemoteQueryDispatcherconnectionMonitorParams- heartbeat and idle monitoring parameters- Throws:
IOException- if an error occurred connecting to the RemoteQueryDispatcher
-
RemoteQueryClient
public RemoteQueryClient(String serverHost, int serverPort, @Nullable com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams, @NotNull com.fishlib.auth.WAuthenticationClientManager authenticationClientManager) throws IOExceptionCreate a RemoteQueryClient and connect it to the RemoteQueryDispatcher.- Parameters:
serverHost- the hostname of the RemoteQueryDispatcherserverPort- the port of the RemoteQueryDispatcherconnectionMonitorParams- heartbeat and idle monitoring parametersauthenticationClientManager- the authentication client manager to use- Throws:
IOException- if an error occurred connecting to the RemoteQueryDispatcher
-
-
Method Details
-
getDefaultClassPushList
-
getDefaultClassPathList
-
getClassPushList
-
connectToNewProcessor
public static QueryProcessorConnection connectToNewProcessor(@NotNull com.fishlib.io.logger.Logger log, @NotNull QueryDispatcherConnection dispatcherConnection, @Nullable com.fishlib.auth.AuthToken authToken, @NotNull QueryDispatcherConnection.QueryProcessorRequestHandle handle, @Nullable QueryProcessorConnection.DisconnectHandler disconnectHandler, @Nullable com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams, @NotNull com.fishlib.auth.WAuthenticationClientManager authenticationClientManager, String[] classpath, int priority, int maxHeapSizeMb, String queryDescription, boolean debug, boolean detailedGCLogging, boolean omitDefaultGcParameters, boolean exportQueryScope, List<RemoteQueryClassDefinition> classPushList, Map<String,String> extraEnvironmentVars, String... jvmArgs) throws RemoteQueryException- Throws:
RemoteQueryException
-
connectToNewProcessor
public static QueryProcessorConnection connectToNewProcessor(@NotNull com.fishlib.io.logger.Logger log, @NotNull QueryDispatcherConnection dispatcherConnection, @Nullable com.fishlib.auth.AuthToken authToken, @NotNull QueryDispatcherConnection.QueryProcessorRequestHandle handle, @Nullable QueryProcessorConnection.DisconnectHandler disconnectHandler, @Nullable com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams, @NotNull com.fishlib.auth.WAuthenticationClientManager authenticationClientManager, String[] classpath, int maxHeapSizeMb, String queryDescription, boolean debug, boolean detailedGCLogging, boolean omitDefaultGcParameters, boolean exportQueryScope, List<RemoteQueryClassDefinition> classPushList, Map<String,String> extraEnvironmentVars, String... jvmArgs) throws RemoteQueryExceptionDelegate toconnectToNewProcessor(Logger, QueryDispatcherConnection, AuthToken, QueryDispatcherConnection.QueryProcessorRequestHandle, QueryProcessorConnection.DisconnectHandler, ConnectionMonitor.Params, WAuthenticationClientManager, String[], int, int, String, boolean, boolean, boolean, boolean, List, Map, String...)with a worker priority ofDEFAULT_WORKER_PRIORITY.- Throws:
RemoteQueryException
-
getExtraJvmArgs
-
connectToExistingProcessor
public static QueryProcessorConnection connectToExistingProcessor(@NotNull com.fishlib.io.logger.Logger log, @Nullable com.fishlib.auth.AuthToken authToken, int port, String hostName, String workerId, String processInfoId, @Nullable QueryProcessorConnection.DisconnectHandler disconnectHandler, @Nullable com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams) throws IOException- Throws:
IOException
-
connectToExistingProcessor
public static QueryProcessorConnection connectToExistingProcessor(@NotNull com.fishlib.io.logger.Logger log, @Nullable com.fishlib.auth.AuthToken authToken, int port, String hostName, String workerId, String processInfoId, @Nullable QueryProcessorConnection.DisconnectHandler disconnectHandler, @Nullable com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams, @NotNull com.fishlib.auth.WAuthenticationClientManager authenticationClientManager) throws IOException- Throws:
IOException
-
connectToExistingProcessor
public static QueryProcessorConnection connectToExistingProcessor(@NotNull com.fishlib.io.logger.Logger log, @Nullable com.fishlib.auth.AuthToken authToken, int port, String hostName, int webSocketPort, String envoyPrefix, String workerId, String processInfoId, @Nullable QueryProcessorConnection.DisconnectHandler disconnectHandler, @Nullable com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams, boolean combineWorkerConnectionStats, @NotNull com.fishlib.auth.WAuthenticationClientManager authenticationClientManager) throws IOException- Throws:
IOException
-
buildClassList
public static List<RemoteQueryClassDefinition> buildClassList(Class<?>... classes) throws IOException- Throws:
IOException
-
buildClassList
public static List<RemoteQueryClassDefinition> buildClassList(@Nullable List<RemoteQueryClassDefinition> classList, Class<?>... classes) throws IOException- Throws:
IOException
-
isConnected
public boolean isConnected()- Returns:
- Whether this connection is still connected to the RemoteQueryDispatcher. Note: If it's not, you'll need to create a new one and re-push any client classes needed on the server.
-
getRemoteDB
Creates a Database object that communicates with a remote query worker. The requested worker will have the heap size specified by RemoteProcessingRequest.defaultQueryHeapMB property.- Returns:
- a RemoteDatabase that can be used to query Deephaven
- Throws:
IOException- if there was an error communicating with the query server
-
getRemoteDB
Creates a Database object that communicates with a remote query worker.- Parameters:
maxHeapSizeMb- the worker heap size to request- Returns:
- a RemoteDatabase that can be used to query Deephaven
- Throws:
IOException- if there was an error communicating with the query server
-
getRemoteDB
public RemoteDatabase getRemoteDB(int maxHeapSizeMb, @NotNull String jvmProfileName, String... extraJvmArgs) throws IOException- Throws:
IOException
-
getRemoteDB
public RemoteDatabase getRemoteDB(int maxHeapSizeMb, String description, boolean debug, String... jvmArgs) throws IOException- Throws:
IOException
-
getRemoteDB
public RemoteDatabase getRemoteDB(int maxHeapSizeMb, String description, boolean debug, Map<String,String> extraEnvironmentVars, String... jvmArgs) throws IOException- Throws:
IOException
-
getRemoteDB
public RemoteDatabase getRemoteDB(com.fishlib.auth.WAuthenticationClientManager authenticationClientManager, int maxHeapSizeMb, String description, boolean debug, Map<String,String> extraEnvironmentVars, String... jvmArgs) throws IOException- Throws:
IOException
-
getRemoteDB
public RemoteDatabase getRemoteDB(@Nullable com.fishlib.auth.AuthToken authToken, @NotNull QueryDispatcherConnection.QueryProcessorRequestHandle handle, @Nullable QueryProcessorConnection.DisconnectHandler disconnectHandler, @Nullable com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams, @NotNull com.fishlib.auth.WAuthenticationClientManager authenticationClientManager, String[] classpath, int maxHeapSizeMb, String queryDescription, boolean debug, boolean detailedGCLogging, List<RemoteQueryClassDefinition> classPushList, Map<String,String> extraEnvironmentVars, String... jvmArgs) throws IOException- Throws:
IOException
-
getRemoteDB
public RemoteDatabase getRemoteDB(@Nullable com.fishlib.auth.AuthToken authToken, @NotNull QueryDispatcherConnection.QueryProcessorRequestHandle handle, @Nullable QueryProcessorConnection.DisconnectHandler disconnectHandler, @Nullable com.fishlib.net.ConnectionMonitor.Params connectionMonitorParams, @NotNull com.fishlib.auth.WAuthenticationClientManager authenticationClientManager, String[] classpath, int maxHeapSizeMb, String queryDescription, boolean debug, boolean detailedGCLogging, boolean omitDefaultGcParameters, List<RemoteQueryClassDefinition> classPushList, Map<String,String> extraEnvironmentVars, String... jvmArgs) throws IOException- Throws:
IOException
-
pushClasses
Pushes classes to the dispatcher for later use when processing queries.- Parameters:
classes- The classes to be pushed- Throws:
IOException
-
sendQuery
public <T> T sendQuery(RemoteQuery<T> remoteQuery, int processorHeapMB, long maxDurationMS, Class<?>... additionalClasses) throws IOExceptionRequests a query processor from the dispatcher, and sends a query to the processor for execution. Does not push the query class itself, unless you add it to additionalClasses.- Type Parameters:
T- The return type of remoteQuery.execute()- Parameters:
remoteQuery- The query to executeprocessorHeapMB- The heap size (in megabytes) to request for the query processormaxDurationMS- Maximum duration (in millseconds) the dispatcher should expect the query to run foradditionalClasses- For convenience, additional classes to push to the query server- Returns:
- The result of remoteQuery.execute()
- Throws:
IOException
-
sendQuery
public <T> T sendQuery(RemoteQuery<T> remoteQuery, int processorHeapMB, long maxDurationMS, long workerAcquisitionTimeoutMillis, Class<?>... additionalClasses) throws IOExceptionRequests a query processor from the dispatcher, and sends a query to the processor for execution. Does not push the query class itself, unless you add it to additionalClasses.- Parameters:
remoteQuery- The query to executeprocessorHeapMB- The heap size (in megabytes) to request for the query processormaxDurationMS- Maximum duration (in millseconds) the dispatcher should expect the query to run forworkerAcquisitionTimeoutMillis-additionalClasses- For convenience, additional classes to push to the query server @return The result of remoteQuery.execute()- Throws:
IOException
-
sendQuery
public <T> T sendQuery(RemoteQuery<T> remoteQuery, Class<?>... additionalClasses) throws IOExceptionRequests a query processor from the dispatcher, and sends a query to the processor for execution. Does not push the query class itself, unless you add it to additionalClasses. Applies configuration defaults for maximum heap size and query duration.- Type Parameters:
T- The return type of remoteQuery.execute()- Parameters:
remoteQuery- The query to executeadditionalClasses- For convenience, additional classes to push to the query server- Returns:
- The result of remoteQuery.execute()
- Throws:
IOException
-
sendQuery
public <T> T sendQuery(RemoteQuery<T> remoteQuery, long workerAcquisitionTimeoutMillis, Class<?>... additionalClasses) throws IOExceptionRequests a query processor from the dispatcher, and sends a query to the processor for execution. Does not push the query class itself, unless you add it to additionalClasses. Applies configuration defaults for maximum heap size and query duration.- Parameters:
remoteQuery- The query to executeworkerAcquisitionTimeoutMillis-additionalClasses- For convenience, additional classes to push to the query server @return The result of remoteQuery.execute()- Throws:
IOException
-
sendQuery
public <T> T sendQuery(RemoteQuery<T> remoteQuery, RemoteProcessingRequest request, Class<?>... additionalClasses) throws IOExceptionRequests a query processor from the dispatcher, and sends a query to the processor for execution. Does not push the query class itself, unless you add it to additionalClasses.- Type Parameters:
T- The return type of remoteQuery.execute()- Parameters:
remoteQuery- The query to executerequest- Instructions for query executionadditionalClasses- For convenience, additional classes to push to the query server- Returns:
- The result of remoteQuery.execute()
- Throws:
IOException
-
sendQuery
public <T> T sendQuery(RemoteQuery<T> remoteQuery, RemoteProcessingRequest request, long workerAcquisitionTimeoutMillis, Class<?>... additionalClasses) throws IOExceptionRequests a query processor from the dispatcher, and sends a query to the processor for execution. Does not push the query class itself, unless you add it to additionalClasses.- Parameters:
remoteQuery- The query to executerequest- Instructions for query executionworkerAcquisitionTimeoutMillis-additionalClasses- For convenience, additional classes to push to the query server @return The result of remoteQuery.execute()- Throws:
IOException
-
sendNewQuery
public <T> T sendNewQuery(RemoteQuery<T> remoteQuery, int processorHeapMB, long maxDurationMS, Class<?>... additionalClasses) throws IOExceptionRequests a query processor from the dispatcher, and sends a query to the processor for execution. Always pushes the query class, in addition to the additionalClasses specified.- Type Parameters:
T- The return type of remoteQuery.execute()- Parameters:
remoteQuery- The query to executeprocessorHeapMB- The heap size (in megabytes) to request for the query processormaxDurationMS- Maximum duration (in millseconds) the dispatcher should expect the query to run foradditionalClasses- For convenience, additional classes to push to the query server- Returns:
- The result of remoteQuery.execute()
- Throws:
IOException
-
sendNewQuery
public <T> T sendNewQuery(RemoteQuery<T> remoteQuery, Class<?>... additionalClasses) throws IOExceptionRequests a query processor from the dispatcher, and sends a query to the processor for execution. Always pushes the query class, in addition to the additionalClasses specified. Applies configuration defaults for maximum heap size and query duration.- Type Parameters:
T- The return type of remoteQuery.execute()- Parameters:
remoteQuery- The query to executeadditionalClasses- For convenience, additional classes to push to the query server- Returns:
- The result of remoteQuery.execute()
- Throws:
IOException
-
sendNewQuery
public <T> T sendNewQuery(RemoteQuery<T> remoteQuery, long workerAcquisitionTimeoutMillis, Class<?>... additionalClasses) throws IOExceptionRequests a query processor from the dispatcher, and sends a query to the processor for execution. Always pushes the query class, in addition to the additionalClasses specified. Applies configuration defaults for maximum heap size and query duration.- Parameters:
remoteQuery- The query to executeworkerAcquisitionTimeoutMillis-additionalClasses- For convenience, additional classes to push to the query server @return The result of remoteQuery.execute()- Throws:
IOException
-
sendNewQuery
public <T> T sendNewQuery(RemoteQuery<T> remoteQuery, RemoteProcessingRequest request, Class<?>... additionalClasses) throws IOExceptionRequests a query processor from the dispatcher, and sends a query to the processor for execution. Always pushes the query class, in addition to the additionalClasses specified.- Type Parameters:
T- The return type of remoteQuery.execute()- Parameters:
remoteQuery- The query to executerequest- Instructions for query executionadditionalClasses- For convenience, additional classes to push to the query server- Returns:
- The result of remoteQuery.execute()
- Throws:
IOException
-
sendNewQuery
public <T> T sendNewQuery(RemoteQuery<T> remoteQuery, RemoteProcessingRequest request, long workerAcquisitionTimeoutMillis, Class<?>... additionalClasses) throws IOExceptionRequests a query processor from the dispatcher, and sends a query to the processor for execution. Always pushes the query class, in addition to the additionalClasses specified.- Parameters:
remoteQuery- The query to executerequest- Instructions for query executionworkerAcquisitionTimeoutMillis-additionalClasses- For convenience, additional classes to push to the query server @return The result of remoteQuery.execute()- Throws:
IOException
-
handleCommand
public void handleCommand(com.fishlib.net.api.ClientEntry client, com.fishlib.base.Command comm)- Specified by:
handleCommandin interfacecom.fishlib.net.api.CommandHandler
-
handleClientDeath
public void handleClientDeath(com.fishlib.net.api.ClientEntry client)- Specified by:
handleClientDeathin interfacecom.fishlib.net.api.CommandHandler
-