Modifier and Type | Field and Description |
---|---|
protected SessionConfiguration |
mSessionConfig
Session configuration.
|
Modifier | Constructor and Description |
---|---|
protected |
Session(Storage pStorage,
ResourceConfiguration pResourceConf,
SessionConfiguration pSessionConf,
UberBucket pBucket)
Hidden constructor, only visible for the Storage-Class for instantiation.
|
Modifier and Type | Method and Description |
---|---|
IBucketReadTrx |
beginBucketRtx(long pRevKey)
Begin exclusive read transaction on the bucket layer
|
IBucketWriteTrx |
beginBucketWtx()
Begin exclusive write transaction on the bucket layer
|
IBucketWriteTrx |
beginBucketWtx(long mRepresentRevision)
Begin exclusive write transaction on the bucket layer with fixed revisions.
|
boolean |
close()
Safely close session and immediately release all resources.
|
boolean |
deregisterBucketTrx(IBucketReadTrx pTrx)
Deregisters a registered bucket transaction.
|
ResourceConfiguration |
getConfig()
Getting the resource configuration
|
long |
getMostRecentVersion()
Getting the most recent version from the storage.
|
protected void |
setLastCommittedUberBucket(UberBucket pBucket) |
void |
setRunningCommit(Future<Void> pRunningCommit)
Setting running commit to session.
|
String |
toString() |
boolean |
truncate()
Truncating the resource where this
ISession is bound to. |
void |
waitForRunningCommit()
Waiting and blocking for running commit.
|
protected final SessionConfiguration mSessionConfig
protected Session(Storage pStorage, ResourceConfiguration pResourceConf, SessionConfiguration pSessionConf, UberBucket pBucket) throws TTException
pStorage
- Storage for centralized operations on related sessions.pSessionConf
- StorageConfiguration for general setting about the storagepResourceConf
- ResourceConfiguration for handling this specific sessionpBucket
- to be set.TTException
public IBucketReadTrx beginBucketRtx(long pRevKey) throws TTException
ISession
beginBucketRtx
in interface ISession
pRevKey
- revision key for the revision askIBucketReadTrx
instanceTTException
public IBucketWriteTrx beginBucketWtx() throws TTException
ISession
beginBucketWtx
in interface ISession
IBucketReadTrx
instanceTTException
public IBucketWriteTrx beginBucketWtx(long mRepresentRevision) throws TTException
ISession
beginBucketWtx
in interface ISession
IBucketReadTrx
instanceTTException
public boolean close() throws TTException
close
in interface ISession
TTException
- If can't close session.public boolean truncate() throws TTException
ISession
is bound to. Note that the session must be closed
first.truncate
in interface ISession
TTException
- if anything weird happens.protected void setLastCommittedUberBucket(UberBucket pBucket)
public long getMostRecentVersion() throws TTIOException
getMostRecentVersion
in interface ISession
TTIOException
public ResourceConfiguration getConfig()
public boolean deregisterBucketTrx(IBucketReadTrx pTrx) throws TTIOException
deregisterBucketTrx
in interface ISession
pTrx
- to be deregistered.TTIOException
public void waitForRunningCommit() throws TTIOException
waitForRunningCommit
in interface ISession
TTIOException
- if something goes weirdpublic void setRunningCommit(Future<Void> pRunningCommit)
setRunningCommit
in interface ISession
pRunningCommit
- to be setCopyright © 2013. All Rights Reserved.