public class SessionOptions extends Object
Constructor and Description |
---|
SessionOptions()
Default constructor
|
SessionOptions(JsonObject options)
Constructor from JSON
|
SessionOptions(SessionOptions options)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
SessionBehavior |
getBehavior()
Get the behavior when a session is invalidated.
|
List<String> |
getChecks()
Get a list of associated health checks.
|
long |
getLockDelay()
Get the lock-delay period.
|
String |
getName()
Get the human-readable name for the Session
|
String |
getNode()
Get the node to which the session will be assigned
|
long |
getTtl()
Get the TTL interval.
|
SessionOptions |
setBehavior(SessionBehavior behavior)
Set the behavior when a session is invalidated.
|
SessionOptions |
setChecks(List<String> checks)
Set a list of associated health checks.
|
SessionOptions |
setLockDelay(long lockDelay)
Set the lock-delay period.
|
SessionOptions |
setName(String name)
Set the human-readable name for the Session
|
SessionOptions |
setNode(String node)
Set the node to which the session will be assigned
|
SessionOptions |
setTtl(long ttl)
Set the TTL interval.
|
JsonObject |
toJson()
Convert to JSON
|
public SessionOptions()
public SessionOptions(SessionOptions options)
options
- the one to copypublic SessionOptions(JsonObject options)
options
- the JSONpublic JsonObject toJson()
public long getLockDelay()
Session.getLockDelay()
public SessionOptions setLockDelay(long lockDelay)
lockDelay
- the lock-delay period in secondsSession.getLockDelay()
public String getName()
public SessionOptions setName(String name)
name
- the name of sessionpublic String getNode()
public SessionOptions setNode(String node)
node
- the ID of nodepublic List<String> getChecks()
setChecks(List)
public SessionOptions setChecks(List<String> checks)
checks
- list of associated health checkspublic SessionBehavior getBehavior()
setBehavior(SessionBehavior)
public SessionOptions setBehavior(SessionBehavior behavior)
behavior
- the session behaviorpublic long getTtl()
setTtl(long)
public SessionOptions setTtl(long ttl)
ttl
- the TTL interval in secondsCopyright © 2017. All rights reserved.