public class ProxySessionManagerService extends AbstractProxySessionManager implements GracefulShutdownAwareService, RaftManagedService
| Modifier and Type | Field and Description | 
|---|---|
| static String | SERVICE_NAMEName of the service | 
NO_SESSION_ID| Constructor and Description | 
|---|
| ProxySessionManagerService(NodeEngine nodeEngine) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected ICompletableFuture<Object> | closeSession(RaftGroupId groupId,
            Long sessionId)Closes the given session on the Raft group | 
| protected long | generateThreadId(RaftGroupId groupId)Generates a cluster-wide unique thread id for the caller | 
| protected ICompletableFuture<Object> | heartbeat(RaftGroupId groupId,
         long sessionId)Commits a heartbeat for the session on the Raft group | 
| void | init(NodeEngine nodeEngine,
    Properties properties)Initializes this service. | 
| void | onCPSubsystemRestart()Called when the CP subsystem is restarted. | 
| boolean | onShutdown(long timeout,
          TimeUnit unit)A hook method that's called during graceful shutdown to provide safety for data managed by this service. | 
| protected SessionResponse | requestNewSession(RaftGroupId groupId)Creates a new session on the Raft group | 
| void | reset()Resets this service back to its initial state. | 
| protected ScheduledFuture<?> | scheduleWithRepetition(Runnable task,
                      long period,
                      TimeUnit unit)Schedules the given task for repeating execution | 
| void | shutdown(boolean terminate)Shuts down this service. | 
acquireSession, acquireSession, getOrCreateUniqueThreadId, getSession, getSessionAcquireCount, invalidateSession, releaseSession, releaseSession, resetInternalState, shutdownpublic static final String SERVICE_NAME
public ProxySessionManagerService(NodeEngine nodeEngine)
protected long generateThreadId(RaftGroupId groupId)
AbstractProxySessionManagergenerateThreadId in class AbstractProxySessionManagerprotected SessionResponse requestNewSession(RaftGroupId groupId)
AbstractProxySessionManagerrequestNewSession in class AbstractProxySessionManagerprotected ICompletableFuture<Object> heartbeat(RaftGroupId groupId, long sessionId)
AbstractProxySessionManagerheartbeat in class AbstractProxySessionManagerprotected ICompletableFuture<Object> closeSession(RaftGroupId groupId, Long sessionId)
AbstractProxySessionManagercloseSession in class AbstractProxySessionManagerprotected ScheduledFuture<?> scheduleWithRepetition(Runnable task, long period, TimeUnit unit)
AbstractProxySessionManagerscheduleWithRepetition in class AbstractProxySessionManagerpublic boolean onShutdown(long timeout,
                          TimeUnit unit)
GracefulShutdownAwareServiceonShutdown in interface GracefulShutdownAwareServicetimeout - timeout for graceful shutdownunit - time unitpublic void init(NodeEngine nodeEngine, Properties properties)
ManagedServiceinit in interface ManagedServicenodeEngine - the NodeEngine that this service belongs toproperties - the Properties (can be used to pass settings to the service)public void reset()
ManagedServiceTODO: what is the purpose of reset
reset in interface ManagedServicepublic void shutdown(boolean terminate)
ManagedServiceTODO: what is the purpose of the terminate variable
shutdown in interface ManagedServiceterminate - true to shut down this servicepublic void onCPSubsystemRestart()
RaftManagedServiceonCPSubsystemRestart in interface RaftManagedServiceCopyright © 2020 Hazelcast, Inc.. All Rights Reserved.