Interface RemoteInvokerRegistry
- All Known Implementing Classes:
SimpleRemoteInvokerRegistry
public interface RemoteInvokerRegistry
Manages connections to the cluster.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents the remote invoker status. -
Method Summary
Modifier and TypeMethodDescriptiondefault List<RemoteInvoker> getAllRemoteInvokers(ApplicationId applicationId) Returns aRemoteInvokerfor all knownNodeIds.Gets allRemoteInvokerinstances across all applications.getAllRemoteInvokerStatuses(ApplicationId applicationId) Returns aRemoteInvokerfor all knownNodeIds.default RemoteInvokergetBestRemoteInvoker(ApplicationId applicationId) Returns aRemoteInvokerby arbitrary selection.getBestRemoteInvokerStatus(ApplicationId applicationId) Returns aRemoteInvokerby arbitrary selection.getRemoteInvoker(NodeId nodeId) Returns theRemoteInvokerregistered under the given NodeId.voidrefresh()Forces or initiates a refresh of allNodeIds available.voidstart()Starts thisRemoteInvokerRegistry.voidstop()STops thisRemoteInvokerRegistry.
-
Method Details
-
start
void start()Starts thisRemoteInvokerRegistry. -
stop
void stop()STops thisRemoteInvokerRegistry. -
refresh
void refresh()Forces or initiates a refresh of allNodeIds available. Opening new connections if necessary. This will block until the refresh operation has been completed and all new connections established (if necessary). -
getAllRemoteInvokerStatuses
List<RemoteInvokerRegistry.RemoteInvokerStatus> getAllRemoteInvokerStatuses()Gets allRemoteInvokerinstances across all applications.- Returns:
- the
List<RemoteInvoker>
-
getAllRemoteInvokerStatuses
List<RemoteInvokerRegistry.RemoteInvokerStatus> getAllRemoteInvokerStatuses(ApplicationId applicationId) Returns aRemoteInvokerfor all knownNodeIds. This will be a perfect snapshot of the state of the registry.- Parameters:
applicationId-- Returns:
- a
List<RemoteInvoker>
-
getAllRemoteInvokers
Returns aRemoteInvokerfor all knownNodeIds. This will be a perfect snapshot of the state of the registry.- Parameters:
applicationId-- Returns:
- a
List<RemoteInvoker>
-
getBestRemoteInvoker
Returns aRemoteInvokerby arbitrary selection. The underlyingRemoteInvokerRegistrymay employ heuristics to determine the most suitableRemoteInvokerto return. However, this defers entirely to the underlying implementation to make that determination.- Parameters:
applicationId-
-
getBestRemoteInvokerStatus
Returns aRemoteInvokerby arbitrary selection. The underlyingRemoteInvokerRegistrymay employ heuristics to determine the most suitableRemoteInvokerto return. However, this defers entirely to the underlying implementation to make that determination.- Parameters:
applicationId-
-
getRemoteInvoker
Returns theRemoteInvokerregistered under the given NodeId.- Parameters:
nodeId- the node identifier (may be a NodeId for either an instance or application).- Returns:
- a RemoteInvoker for the given nodeId, or null if not found.
-