public class ConsoleSession
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.lang.String |
checkpoint(long lifetimeSeconds)
Creates and returns a checkpoint with the given lifetime in seconds.
|
static ConsoleSession |
create(NodeStore store,
Whiteboard whiteboard) |
NodeState |
getRoot()
Returns the currently set root node.
|
NodeStore |
getStore() |
Whiteboard |
getWhiteboard() |
@NotNull NodeState |
getWorkingNode()
The node state for the current working path.
|
java.lang.String |
getWorkingPath()
Returns the current working path.
|
boolean |
isAutoRefresh() |
void |
refresh()
Performs a manual refresh of the root node state.
|
void |
retrieve(java.lang.String checkpoint)
Retrieves the root node from a previously created checkpoint.
|
void |
setAutoRefresh(boolean enable)
Enables or disables auto-refresh of the root node state on
getRoot() . |
java.lang.String |
setWorkingPath(java.lang.String path)
Sets a new working path and returns the previously set.
|
public static ConsoleSession create(NodeStore store, Whiteboard whiteboard)
public java.lang.String getWorkingPath()
public java.lang.String setWorkingPath(java.lang.String path)
path
- the new working path.public java.lang.String checkpoint(long lifetimeSeconds)
lifetimeSeconds
- the lifetime of the checkpoint in seconds.public void retrieve(java.lang.String checkpoint)
getRoot()
.checkpoint
- the checkpoint reference.public NodeState getRoot()
isAutoRefresh()
is set,
a fresh root node is retrieved from the store.public NodeStore getStore()
public Whiteboard getWhiteboard()
@NotNull public @NotNull NodeState getWorkingNode()
public void setAutoRefresh(boolean enable)
getRoot()
.enable
- enables or disables auto-refresh.public boolean isAutoRefresh()
true
if auto-refresh is enabled; false
otherwise.public void refresh()
Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.