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, wait
checkSession, commitSession, createSession, dumpSessions, getSessionExpiryMap, removeSession, setOwner, setSessionClosing, shutdown, touchSession, trackSession
protected 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 SessionTracker
public boolean isLocalSession(long sessionId)
public boolean isLocalSessionsEnabled()
isLocalSessionsEnabled
in interface SessionTracker
public 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
SessionTracker
checkGlobalSession
in interface SessionTracker
KeeperException.SessionExpiredException
KeeperException.SessionMovedException
public long getLocalSessionCount()
SessionTracker
getLocalSessionCount
in interface SessionTracker
Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.