Package alluxio
Class SessionInfo
- java.lang.Object
-
- alluxio.SessionInfo
-
@ThreadSafe public class SessionInfo extends java.lang.Object
Represents one session in the worker daemon.
-
-
Constructor Summary
Constructors Constructor Description SessionInfo(long sessionId, int sessionTimeoutMs)
Creates a new instance ofSessionInfo
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
long
getSessionId()
int
hashCode()
void
heartbeat()
Performs a session heartbeat.boolean
timeout()
Checks whether the session has timed out.java.lang.String
toString()
-
-
-
Constructor Detail
-
SessionInfo
public SessionInfo(long sessionId, int sessionTimeoutMs)
Creates a new instance ofSessionInfo
.- Parameters:
sessionId
- the session idsessionTimeoutMs
- the session timeout in milliseconds
-
-
Method Detail
-
getSessionId
public long getSessionId()
- Returns:
- the session id
-
heartbeat
public void heartbeat()
Performs a session heartbeat.
-
timeout
public boolean timeout()
Checks whether the session has timed out.- Returns:
- true if the session has timed out and false otherwise
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-