public class LearnerSessionTracker extends Object implements SessionTracker
SessionTracker.Session, SessionTracker.SessionExpirer
Constructor and Description |
---|
LearnerSessionTracker(SessionTracker.SessionExpirer expirer,
ConcurrentHashMap<Long,Integer> sessionsWithTimeouts,
long id,
ZooKeeperServerListener listener) |
Modifier and Type | Method and Description |
---|---|
void |
addSession(long sessionId,
int sessionTimeout) |
void |
checkSession(long sessionId,
Object owner) |
long |
createSession(int sessionTimeout) |
void |
dumpSessions(PrintWriter pwriter)
Text dump of session information, suitable for debugging.
|
void |
removeSession(long sessionId) |
void |
setOwner(long sessionId,
Object owner) |
void |
setSessionClosing(long sessionId)
Mark that the session is in the process of closing.
|
void |
shutdown() |
boolean |
touchSession(long sessionId,
int sessionTimeout) |
public LearnerSessionTracker(SessionTracker.SessionExpirer expirer, ConcurrentHashMap<Long,Integer> sessionsWithTimeouts, long id, ZooKeeperServerListener listener)
public void removeSession(long sessionId)
removeSession
in interface SessionTracker
public void shutdown()
shutdown
in interface SessionTracker
public void addSession(long sessionId, int sessionTimeout)
addSession
in interface SessionTracker
public boolean touchSession(long sessionId, int sessionTimeout)
touchSession
in interface SessionTracker
public long createSession(int sessionTimeout)
createSession
in interface SessionTracker
public void checkSession(long sessionId, Object owner)
checkSession
in interface SessionTracker
public void setOwner(long sessionId, Object owner)
setOwner
in interface SessionTracker
public void dumpSessions(PrintWriter pwriter)
SessionTracker
dumpSessions
in interface SessionTracker
pwriter
- the output writerpublic void setSessionClosing(long sessionId)
SessionTracker
setSessionClosing
in interface SessionTracker
Copyright © 2016 The Apache Software Foundation