public abstract class UpgradeableSessionTracker extends Object implements SessionTracker
SessionTracker.Session, SessionTracker.SessionExpirer| Modifier and Type | Field and Description |
|---|---|
protected boolean |
localSessionsEnabled |
protected LocalSessionTracker |
localSessionTracker |
| Constructor and Description |
|---|
UpgradeableSessionTracker() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkGlobalSession(long sessionId,
Object owner)
Strictly check that a given session is a global session or not
|
void |
createLocalSessionTracker(SessionTracker.SessionExpirer expirer,
int tickTime,
long id,
ZooKeeperServerListener listener) |
void |
finishedUpgrading(long sessionId) |
long |
getLocalSessionCount()
If this session tracker supports local sessions, return how many.
|
abstract boolean |
isGlobalSession(long sessionId) |
boolean |
isLocalSession(long sessionId) |
boolean |
isLocalSessionsEnabled() |
boolean |
isTrackingSession(long sessionId) |
boolean |
isUpgradingSession(long sessionId) |
protected void |
removeLocalSession(long sessionId) |
void |
start() |
int |
upgradeSession(long sessionId)
Upgrades the session to a global session.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckSession, commitSession, createSession, dumpSessions, getSessionExpiryMap, removeSession, setOwner, setSessionClosing, shutdown, touchSession, trackSessionprotected LocalSessionTracker localSessionTracker
protected boolean localSessionsEnabled
public void start()
public void createLocalSessionTracker(SessionTracker.SessionExpirer expirer, int tickTime, long id, ZooKeeperServerListener listener)
public boolean isTrackingSession(long sessionId)
isTrackingSession in interface SessionTrackerpublic boolean isLocalSession(long sessionId)
public boolean isLocalSessionsEnabled()
isLocalSessionsEnabled in interface SessionTrackerpublic boolean isUpgradingSession(long sessionId)
public void finishedUpgrading(long sessionId)
public abstract boolean isGlobalSession(long sessionId)
public int upgradeSession(long sessionId)
sessionId - protected void removeLocalSession(long sessionId)
public void checkGlobalSession(long sessionId,
Object owner)
throws KeeperException.SessionExpiredException,
KeeperException.SessionMovedException
SessionTrackercheckGlobalSession in interface SessionTrackerKeeperException.SessionExpiredExceptionKeeperException.SessionMovedExceptionpublic long getLocalSessionCount()
SessionTrackergetLocalSessionCount in interface SessionTrackerCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.