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(@NotNull IrisGroupProvider groupProvider, @NotNull ClientStateManager clientManager, @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). -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()put(@NotNull Long key, @NotNull PersistentQueryInfo value) protected voidremoveClientAndObserver(ClientStateManager.ClientState clientState) Remove a client, possibly completing its subscription if it was active.protected voidsubscribe(SubscribeRequest request, 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, valuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 @NotNull IrisGroupProvider groupProvider, @NotNull @NotNull ClientStateManager clientManager, @NotNull @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- theClientStateManagerfor looking up client detailspolicyFinder- a function to locate theAssignmentPolicyinstance for queries.
-
-
Method Details
-
put
public PersistentQueryInfo put(@NotNull @NotNull Long key, @NotNull @NotNull PersistentQueryInfo value) - Specified by:
putin interfaceMap<Long,PersistentQueryInfo> - Overrides:
putin classControllerHashtable
-
remove
- Specified by:
removein interfaceMap<Long,PersistentQueryInfo> - Overrides:
removein classControllerHashtable
-
clear
public void clear()- Specified by:
clearin interfaceMap<Long,PersistentQueryInfo> - Overrides:
clearin classControllerHashtable
-
subscribe
protected void subscribe(SubscribeRequest request, 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
-