public class RaftSessionRegistry extends Object
| Constructor and Description |
|---|
RaftSessionRegistry() |
| Modifier and Type | Method and Description |
|---|---|
RaftSession |
addSession(RaftSession session)
Adds a session.
|
RaftSession |
getSession(long sessionId)
Gets a session by session ID.
|
RaftSession |
getSession(SessionId sessionId)
Gets a session by session ID.
|
Collection<RaftSession> |
getSessions()
Returns the collection of registered sessions.
|
Collection<RaftSession> |
getSessions(PrimitiveId primitiveId)
Returns a set of sessions associated with the given service.
|
RaftSession |
removeSession(SessionId sessionId)
Closes a session.
|
void |
removeSessions(PrimitiveId primitiveId)
Removes all sessions registered for the given service.
|
public RaftSession addSession(RaftSession session)
public RaftSession removeSession(SessionId sessionId)
public RaftSession getSession(SessionId sessionId)
sessionId - The session ID.null if the session doesn't exist.public RaftSession getSession(long sessionId)
sessionId - The session ID.null if the session doesn't exist.public Collection<RaftSession> getSessions()
public Collection<RaftSession> getSessions(PrimitiveId primitiveId)
primitiveId - the service identifierpublic void removeSessions(PrimitiveId primitiveId)
primitiveId - the service identifierCopyright © 2013–2018. All rights reserved.