Package com.illumon.iris.controller
Class ControllerHashtableServer
java.lang.Object
com.illumon.iris.controller.ControllerHashtable
com.illumon.iris.controller.ControllerHashtableServer
- All Implemented Interfaces:
ControllerHashtableEventSource
,Map<Long,
PersistentQueryInfo>
-
Nested Class Summary
-
Field Summary
Fields inherited from class com.illumon.iris.controller.ControllerHashtable
data, handlers
-
Constructor Summary
ConstructorsConstructorDescriptionControllerHashtableServer
(IrisGroupProvider groupProvider, ClientStateManager clientManager, WorkerUrlBuilder workerUrlBuilder, Function<PersistentQueryInfo, AssignmentPolicy> policyFinder) Create a ControllerHashtableServer with the specified id, date, persistence policy, underlying map, and initial capacity for size entries (use default capacity if size==0). -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
put
(Long key, PersistentQueryInfo value) protected void
removeClientAndObserver
(ClientStateManager.ClientState clientState) Remove a client, possibly completing its subscription if it was active.protected void
subscribe
(SubscribeRequest request, io.deephaven.shadow.core.io.grpc.stub.ServerCallStreamObserver<SubscribeResponse> responseObserver, PersistentQueryControllerConfiguration controllerConfig) Methods inherited from class com.illumon.iris.controller.ControllerHashtable
addEventHandler, addEventHandlerAndGetData, containsKey, containsValue, entrySet, get, getData, isEmpty, keySet, notifyHandlers, putAll, removeEventHandler, size, values
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
ControllerHashtableServer
public ControllerHashtableServer(@NotNull IrisGroupProvider groupProvider, @NotNull ClientStateManager clientManager, @NotNull WorkerUrlBuilder workerUrlBuilder, @NotNull Function<PersistentQueryInfo, AssignmentPolicy> policyFinder) Create a ControllerHashtableServer with the specified id, date, persistence policy, underlying map, and initial capacity for size entries (use default capacity if size==0). Requests from the clients are passed over the specified comm channel.- Parameters:
groupProvider
- the provider of group informationclientManager
- theClientStateManager
for looking up client detailsworkerUrlBuilder
- the builder for constructing worker URLspolicyFinder
- a function to locate theAssignmentPolicy
instance for queries.
-
-
Method Details
-
put
- Specified by:
put
in interfaceMap<Long,
PersistentQueryInfo> - Overrides:
put
in classControllerHashtable
-
remove
- Specified by:
remove
in interfaceMap<Long,
PersistentQueryInfo> - Overrides:
remove
in classControllerHashtable
-
clear
public void clear()- Specified by:
clear
in interfaceMap<Long,
PersistentQueryInfo> - Overrides:
clear
in classControllerHashtable
-
subscribe
protected void subscribe(SubscribeRequest request, io.deephaven.shadow.core.io.grpc.stub.ServerCallStreamObserver<SubscribeResponse> responseObserver, PersistentQueryControllerConfiguration controllerConfig) -
removeClientAndObserver
Remove a client, possibly completing its subscription if it was active. If the state was already removed or already completed this returns without error.- Parameters:
clientState
- The state to try to remove
-