Class SimpleRemoteInvokerRegistry
java.lang.Object
dev.getelements.elements.rt.remote.SimpleRemoteInvokerRegistry
- All Implemented Interfaces:
RemoteInvokerRegistry
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.getelements.elements.rt.remote.RemoteInvokerRegistry
RemoteInvokerRegistry.RemoteInvokerStatus -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllRemoteInvokers(ApplicationId applicationId) Returns aRemoteInvokerfor all knownNodeIds.Gets allRemoteInvokerinstances across all applications.getAllRemoteInvokerStatuses(ApplicationId applicationId) Returns aRemoteInvokerfor all knownNodeIds.getBestRemoteInvokerStatus(ApplicationId applicationId) Returns aRemoteInvokerby arbitrary selection.longlonggetRemoteInvoker(NodeId nodeId) Returns theRemoteInvokerregistered under the given NodeId.jakarta.inject.Provider<RemoteInvoker> longvoidrefresh()Forces or initiates a refresh of allNodeIds available.voidsetInstanceConnectionService(InstanceConnectionService instanceConnectionService) voidsetInstanceId(InstanceId instanceId) voidsetRefreshRateSeconds(long refreshRateSeconds) voidsetRefreshTimeoutSeconds(long refreshTimeoutSeconds) voidsetRemoteInvokerProvider(jakarta.inject.Provider<RemoteInvoker> remoteInvokerProvider) voidsetTotalRefreshTimeoutSeconds(long totalRefreshTimeoutSeconds) voidstart()Starts thisRemoteInvokerRegistry.voidstop()STops thisRemoteInvokerRegistry.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.getelements.elements.rt.remote.RemoteInvokerRegistry
getBestRemoteInvoker
-
Field Details
-
REFRESH_RATE_SECONDS
- See Also:
-
REFRESH_TIMEOUT_SECONDS
- See Also:
-
TOTAL_REFRESH_TIMEOUT_SECONDS
- See Also:
-
DEFAULT_REFRESH_RATE
public static final long DEFAULT_REFRESH_RATE- See Also:
-
DEFAULT_REFRESH_TIMEOUT
public static final long DEFAULT_REFRESH_TIMEOUT- See Also:
-
DEFAULT_TOTAL_REFRESH_TIMEOUT
public static final long DEFAULT_TOTAL_REFRESH_TIMEOUT- See Also:
-
-
Constructor Details
-
SimpleRemoteInvokerRegistry
public SimpleRemoteInvokerRegistry()
-
-
Method Details
-
start
public void start()Description copied from interface:RemoteInvokerRegistryStarts thisRemoteInvokerRegistry.- Specified by:
startin interfaceRemoteInvokerRegistry
-
stop
public void stop()Description copied from interface:RemoteInvokerRegistrySTops thisRemoteInvokerRegistry.- Specified by:
stopin interfaceRemoteInvokerRegistry
-
refresh
public void refresh()Description copied from interface:RemoteInvokerRegistryForces 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).- Specified by:
refreshin interfaceRemoteInvokerRegistry
-
getAllRemoteInvokerStatuses
Description copied from interface:RemoteInvokerRegistryGets allRemoteInvokerinstances across all applications.- Specified by:
getAllRemoteInvokerStatusesin interfaceRemoteInvokerRegistry- Returns:
- the
List<RemoteInvoker>
-
getAllRemoteInvokerStatuses
public List<RemoteInvokerRegistry.RemoteInvokerStatus> getAllRemoteInvokerStatuses(ApplicationId applicationId) Description copied from interface:RemoteInvokerRegistryReturns aRemoteInvokerfor all knownNodeIds. This will be a perfect snapshot of the state of the registry.- Specified by:
getAllRemoteInvokerStatusesin interfaceRemoteInvokerRegistry- Parameters:
applicationId-- Returns:
- a
List<RemoteInvoker>
-
getBestRemoteInvokerStatus
public RemoteInvokerRegistry.RemoteInvokerStatus getBestRemoteInvokerStatus(ApplicationId applicationId) Description copied from interface:RemoteInvokerRegistryReturns 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.- Specified by:
getBestRemoteInvokerStatusin interfaceRemoteInvokerRegistry- Parameters:
applicationId-
-
getAllRemoteInvokers
Description copied from interface:RemoteInvokerRegistryReturns aRemoteInvokerfor all knownNodeIds. This will be a perfect snapshot of the state of the registry.- Specified by:
getAllRemoteInvokersin interfaceRemoteInvokerRegistry- Parameters:
applicationId-- Returns:
- a
List<RemoteInvoker>
-
getRemoteInvoker
Description copied from interface:RemoteInvokerRegistryReturns theRemoteInvokerregistered under the given NodeId.- Specified by:
getRemoteInvokerin interfaceRemoteInvokerRegistry- 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.
-
getInstanceId
-
setInstanceId
-
getInstanceConnectionService
-
setInstanceConnectionService
@Inject public void setInstanceConnectionService(InstanceConnectionService instanceConnectionService) -
getRemoteInvokerProvider
-
setRemoteInvokerProvider
@Inject public void setRemoteInvokerProvider(jakarta.inject.Provider<RemoteInvoker> remoteInvokerProvider) -
getRefreshRateSeconds
public long getRefreshRateSeconds() -
setRefreshRateSeconds
@Inject public void setRefreshRateSeconds(@Named("dev.getelements.elements.rt.remote.invoker.registry.report.refresh.rate.seconds") long refreshRateSeconds) -
getRefreshTimeoutSeconds
public long getRefreshTimeoutSeconds() -
setRefreshTimeoutSeconds
@Inject public void setRefreshTimeoutSeconds(@Named("dev.getelements.elements.rt.remote.invoker.registry.report.refresh.timeout.seconds") long refreshTimeoutSeconds) -
getTotalRefreshTimeoutSeconds
public long getTotalRefreshTimeoutSeconds() -
setTotalRefreshTimeoutSeconds
@Inject public void setTotalRefreshTimeoutSeconds(@Named("dev.getelements.elements.rt.remote.invoker.registry.report.total.refresh.timeout.seconds") long totalRefreshTimeoutSeconds)
-