The client interface for interacting with a Simple Database path instance. The object provides a stable session state in which transactions can be started and interaction with the data model can be performed. SDBSession objects are intended to be long lived.
String | getPathName() |
SDBTransaction | createTransaction(SDBRootAddress root_address) |
SDBTransaction | createTransaction() |
SDBRootAddress | getCurrentSnapshot() |
SDBRootAddress[] | getHistoricalSnapshots(long time_start, long time_end) |
boolean | equals(Object ob) |
Constructs the SDBSession with the MckoiDDBClient object (needed to talk with the network) and the path instance name of the database on the network.
Returns the name of the path instance of this session.
Returns an SDBTransaction object based on the data in the given root address. This method is useful for reducing the amount of traffic on the network needed to check if an instance path has changed. Many applications do not always need to fetch the most current snapshot when reading data because it doesn't matter if the information is slightly out of date.
This method allows a client to decide for itself when it wants to check if the state of a database has been updated, and allows reusing the old snapshot views when it is appropriate to do so.
Creates a current snapshot transaction object used for accessing and modifying this Simple Database path instance. This method will query the network and fetch the latest version of the path instance from the root server.
This is the same as calling 'createTransaction(getCurrentSnapshot())'.
Returns an SDBRootAddress that represents the most current snapshot of this path instance. This method will query the network and fetch the latest version from the root server.
Returns an historical set of root node addresses committed to this path between the times given, where the time values follow the conventions of System.currentTimeMillis().
Note that the returned root nodes may not be completely accurate because the mechanism that records the time for each commit does not follow a strict requirement for accuracy. For example, if a root server managing commits for a path instance fails over to a new host, the clock on the new host may be out of sync with the previous host thus it may appear that some commits have happened at the same time and not in a serial sequence.
Therefore consider the nodes returned by this method to be a reasonable approximation of all the snapshot states committed in the given time span.
Returns true if the sessions compare equally.