Class ControllerGrpcHelper
java.lang.Object
com.illumon.iris.controller.utils.ControllerGrpcHelper
This class contains utilities for packing and unpacking objects for gRPC communication.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.deephaven.shadow.core.io.grpc.Metadata.Key<ErrorResponse> -
Method Summary
Modifier and TypeMethodDescriptionmakeControllerConfigMessage(PersistentQueryControllerConfiguration serverConfiguration, Predicate<ConsoleConfigurationType> configTypePredicate) Serialize aPersistentQueryControllerConfigurationfor gRPCmakeDbServerConfig(PQDBServerConfigMessage configMessage) Deserialize aPersistentQueryDbServerConfigfrom gRPC.static ExportedObjectInfoDeserialize anExportedObjectInfofrom gRPC.static ExportedObjectInfoMessagemakeExportedObjectInfoMessage(String name, ExportedObjectInfo type) Make anExportedObjectInfoMessagefrom a name andExportedObjectInfostatic NamedStringListmakeNamedStringList(String name, String[] list) Create aNamedStringListobject from a string array and name.static NamedStringListmakeNamedStringList(String name, Collection<String> list) Create aNamedStringListobject from a collection of strings and name.Deserialize aPersistentQueryControllerConfigurationfrom gRPCstatic PQDBServerConfigMessageSerialize aPersistentQueryDbServerConfigobject for gRPCstatic PersistentQueryConfigurationmakeQueryConfig(PersistentQueryConfigMessage configMessage) Deserialize aPersistentQueryConfigurationfrom gRPC.static PersistentQueryConfigMessageSerialize aPersistentQueryConfigurationobject for gRPC.static PersistentQueryInfomakeQueryInfo(PersistentQueryInfoMessage infoMessage) Deserialize aPersistentQueryInfofrom gRPC.static PersistentQueryInfoMessagemakeQueryInfoMessage(PersistentQueryInfo info, WorkerUrlBuilder workerUrlBuilder, io.deephaven.enterprise.auth.UserContext forUser, IrisGroupProvider groupProvider) Serialize aPersistentQueryInfoobject for gRPC.static PersistentQueryStatemakeQueryState(PersistentQueryStateMessage stateMessage) static PersistentQueryStateMessagemakeStateMessageForPresenceKv(PersistentQueryState state, WorkerUrlBuilder workerUrlBuilder) Creates a PersistetQueryStateMessage with the PersistentQueryState provided.static PersistentQueryState.StatusmakeStatus(PersistentQueryStatusEnum grpcStatus) Deserialize aPersistentQueryState.Statusfrom gRPC.static TableDefinitionDeserialize aTableDefinitionfrom gRPC.static io.deephaven.enterprise.dispatcher.client.WorkerProtocolmakeWorkerProtocol(WorkerProtocolMessage protocolMessage) Deserialize aWorkerProtocolfrom gRPC.
-
Field Details
-
ERROR_KEY
-
-
Method Details
-
makeQueryInfoMessage
public static PersistentQueryInfoMessage makeQueryInfoMessage(@NotNull PersistentQueryInfo info, @NotNull WorkerUrlBuilder workerUrlBuilder, @Nullable io.deephaven.enterprise.auth.UserContext forUser, @Nullable IrisGroupProvider groupProvider) throws io.deephaven.enterprise.controller.exception.ControllerSerializationException Serialize aPersistentQueryInfoobject for gRPC.- Parameters:
info- the object to serializeforUser-groupProvider-- Returns:
- the serialized
PersistentQueryInfoMessage - Throws:
io.deephaven.enterprise.controller.exception.ControllerSerializationException- if a problem occurred converting the message to gRPC
-
makeQueryConfigMessage
public static PersistentQueryConfigMessage makeQueryConfigMessage(@NotNull PersistentQueryConfiguration config) throws io.deephaven.enterprise.controller.exception.ControllerSerializationException Serialize aPersistentQueryConfigurationobject for gRPC.- Parameters:
config- the object to serialize- Returns:
- the serialized
PersistentQueryConfigMessage - Throws:
io.deephaven.enterprise.controller.exception.ControllerSerializationException- if a problem occurred converting the message to gRPC
-
makeStateMessageForPresenceKv
public static PersistentQueryStateMessage makeStateMessageForPresenceKv(@NotNull PersistentQueryState state, @NotNull WorkerUrlBuilder workerUrlBuilder) throws io.deephaven.enterprise.controller.exception.ControllerSerializationException Creates a PersistetQueryStateMessage with the PersistentQueryState provided.- Parameters:
state- the state to use as data to populate the returned messageworkerUrlBuilder- the worker url build to use for the respective fields- Returns:
- a new state message matching the supplied data
- Throws:
io.deephaven.enterprise.controller.exception.ControllerSerializationException- if there are any errors during serialization
-
makeNamedStringList
Create aNamedStringListobject from a string array and name.- Parameters:
name- the name to uselist- the array of values- Returns:
- a new
NamedStringList
-
makeNamedStringList
@NotNull public static NamedStringList makeNamedStringList(@NotNull String name, @Nullable Collection<String> list) Create aNamedStringListobject from a collection of strings and name.- Parameters:
name- the name to uselist- the collection of values- Returns:
- a new
NamedStringList
-
makeExportedObjectInfoMessage
public static ExportedObjectInfoMessage makeExportedObjectInfoMessage(@NotNull String name, @NotNull ExportedObjectInfo type) throws io.deephaven.enterprise.controller.exception.ControllerSerializationException Make anExportedObjectInfoMessagefrom a name andExportedObjectInfo- Parameters:
name- the name of the objecttype- theExportedObjectInfo- Returns:
- a new
ExportedObjectInfoMessage - Throws:
io.deephaven.enterprise.controller.exception.ControllerSerializationException- if a problem occurred converting the message to gRPC
-
makePQDBServerConfigMessage
public static PQDBServerConfigMessage makePQDBServerConfigMessage(@NotNull PersistentQueryDbServerConfig config) throws io.deephaven.enterprise.controller.exception.ControllerSerializationException Serialize aPersistentQueryDbServerConfigobject for gRPC- Parameters:
config- the configuration to serialize- Returns:
- a new
PersistentQueryDbServerConfig - Throws:
io.deephaven.enterprise.controller.exception.ControllerSerializationException- if a problem occurred converting the message to gRPC
-
makeControllerConfigMessage
public static ControllerConfigurationMessage makeControllerConfigMessage(@NotNull PersistentQueryControllerConfiguration serverConfiguration, @NotNull Predicate<ConsoleConfigurationType> configTypePredicate) throws io.deephaven.enterprise.controller.exception.ControllerSerializationException Serialize aPersistentQueryControllerConfigurationfor gRPC- Parameters:
serverConfiguration- the configuration to serialize- Returns:
- a new
ControllerConfigurationMessage - Throws:
io.deephaven.enterprise.controller.exception.ControllerSerializationException- if a problem occurred converting the message to gRPC
-
makeQueryInfo
public static PersistentQueryInfo makeQueryInfo(@NotNull PersistentQueryInfoMessage infoMessage) throws io.deephaven.enterprise.controller.exception.ControllerSerializationException Deserialize aPersistentQueryInfofrom gRPC.- Parameters:
infoMessage- the message to deserialize- Returns:
- a new
PersistentQueryInfo - Throws:
io.deephaven.enterprise.controller.exception.ControllerSerializationException- if a problem occurred deserializing gRPC message
-
makeQueryState
public static PersistentQueryState makeQueryState(@NotNull PersistentQueryStateMessage stateMessage) throws io.deephaven.enterprise.controller.exception.ControllerSerializationException - Throws:
io.deephaven.enterprise.controller.exception.ControllerSerializationException
-
makeWorkerProtocol
public static io.deephaven.enterprise.dispatcher.client.WorkerProtocol makeWorkerProtocol(@NotNull WorkerProtocolMessage protocolMessage) Deserialize aWorkerProtocolfrom gRPC.- Parameters:
protocolMessage- the message to deserialize- Returns:
- a new
WorkerProtocol
-
makeQueryConfig
public static PersistentQueryConfiguration makeQueryConfig(PersistentQueryConfigMessage configMessage) throws io.deephaven.enterprise.controller.exception.ControllerSerializationException Deserialize aPersistentQueryConfigurationfrom gRPC.- Parameters:
configMessage- the message to deserialize- Returns:
- a new
PersistentQueryConfiguration - Throws:
io.deephaven.enterprise.controller.exception.ControllerSerializationException- if a problem occurred deserializing gRPC message
-
makeStatus
public static PersistentQueryState.Status makeStatus(@NotNull PersistentQueryStatusEnum grpcStatus) throws io.deephaven.enterprise.controller.exception.ControllerSerializationException Deserialize aPersistentQueryState.Statusfrom gRPC.- Parameters:
grpcStatus- the message to deserialize- Returns:
- a new
PersistentQueryState.Status. - Throws:
io.deephaven.enterprise.controller.exception.ControllerSerializationException- if a problem occurred deserializing gRPC message
-
makeDbServerConfig
public static PersistentQueryDbServerConfig makeDbServerConfig(PQDBServerConfigMessage configMessage) throws io.deephaven.enterprise.controller.exception.ControllerSerializationException Deserialize aPersistentQueryDbServerConfigfrom gRPC.- Parameters:
configMessage- the message to deserialize- Returns:
- a new
PersistentQueryDbServerConfig - Throws:
io.deephaven.enterprise.controller.exception.ControllerSerializationException- if a problem occurred deserializing gRPC message
-
makePersistentQueryControllerConfiguration
public static PersistentQueryControllerConfiguration makePersistentQueryControllerConfiguration(@NotNull ControllerConfigurationMessage response) throws io.deephaven.enterprise.controller.exception.ControllerSerializationException Deserialize aPersistentQueryControllerConfigurationfrom gRPC- Parameters:
response- the message to deserialize- Returns:
- a new
PersistentQueryControllerConfiguration - Throws:
io.deephaven.enterprise.controller.exception.ControllerSerializationException- if a problem occurred deserializing gRPC message
-
makeExportedObjectInfo
public static ExportedObjectInfo makeExportedObjectInfo(ExportedObjectInfoMessage eo) throws io.deephaven.enterprise.controller.exception.ControllerSerializationException Deserialize anExportedObjectInfofrom gRPC.- Parameters:
eo- the message to deserialize- Returns:
- a new
ExportedObjectInfo - Throws:
io.deephaven.enterprise.controller.exception.ControllerSerializationException- if a problem occurred deserializing gRPC message
-
makeTableDefinition
public static TableDefinition makeTableDefinition(@NotNull TableDefinitionMessage message) throws io.deephaven.enterprise.controller.exception.ControllerSerializationException Deserialize aTableDefinitionfrom gRPC.- Parameters:
message- the message to deserialize- Returns:
- a new
TableDefinition - Throws:
io.deephaven.enterprise.controller.exception.ControllerSerializationException- if a problem occurred deserializing gRPC message
-