@Component public class DefaultSessionServerManager extends AbstractEvictableFilterableLeaseManager<SessionNode> implements SessionServerManager
Nov 24, 2020
metaLeaderServicecurrentEpoch, localRepo, lock, logger| 构造器和说明 |
|---|
DefaultSessionServerManager() |
DefaultSessionServerManager(MetaServerConfig metaServerConfig,
SlotManager slotManager,
MetaLeaderService metaLeaderService) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
cancel(Lease<SessionNode> lease)
Cancel boolean.
|
long |
getEpoch() |
protected int |
getEvictBetweenMilli() |
protected int |
getIntervalMilli() |
VersionedList<SessionNode> |
getSessionServerMetaInfo() |
protected void |
learnFromSession(HeartbeatRequest<SessionNode> heartbeat) |
void |
onHeartbeat(HeartbeatRequest<SessionNode> heartbeat) |
void |
postConstruct() |
void |
preDestory() |
void |
register(Lease<SessionNode> lease)
Register.
|
boolean |
renew(SessionNode renewal,
int duration)
Different from data server, session node maintains a 'ProcessId' to be as unique Id for Session
Process(not server)
Once a restart event happened on the same session-server, an notification will be sent
|
filterOut, getLeaseMeta, setLeaseFiltersdoDispose, doInitialize, evict, getExpiredLeasesamILeadergetLease, refreshEpochaddObserver, notifyObservers, removeObserverdispose, doStart, doStop, getLifecycleState, initialize, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddObserver, removeObserverinitializedisposegetLifecycleStategetLease, getLeaseMetapublic DefaultSessionServerManager()
public DefaultSessionServerManager(MetaServerConfig metaServerConfig, SlotManager slotManager, MetaLeaderService metaLeaderService)
@PostConstruct public void postConstruct() throws Exception
Exception@PreDestroy public void preDestory() throws Exception
Exceptionpublic void register(Lease<SessionNode> lease)
LeaderAwareLeaseManagerregister 在类中 LeaderAwareLeaseManager<SessionNode>lease - the leasepublic boolean renew(SessionNode renewal, int duration)
Once a restart event happened on the same session-server, an notification will be sent
renew 在接口中 LeaseManager<SessionNode>renew 在类中 LeaderAwareLeaseManager<SessionNode>renewal - the renewalduration - the lease durationpublic boolean cancel(Lease<SessionNode> lease)
LeaderAwareLeaseManagercancel 在类中 LeaderAwareLeaseManager<SessionNode>lease - the leaseprotected int getIntervalMilli()
protected int getEvictBetweenMilli()
public VersionedList<SessionNode> getSessionServerMetaInfo()
getSessionServerMetaInfo 在接口中 SessionServerManagerpublic long getEpoch()
getEpoch 在接口中 SessionServerManagerpublic void onHeartbeat(HeartbeatRequest<SessionNode> heartbeat)
onHeartbeat 在接口中 HeartbeatListener<SessionNode>protected void learnFromSession(HeartbeatRequest<SessionNode> heartbeat)
Copyright © 2023 The Ant Financial. All rights reserved.