public final class BucketWriteTrx extends Object implements IBucketWriteTrx
See BucketReadTrx
.
Modifier | Constructor and Description |
---|---|
protected |
BucketWriteTrx(ISession pSession,
UberBucket pUberBucket,
IBackendWriter pWriter,
long pRepresentRev)
Standard constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clearLog() |
boolean |
close()
Close the transaction.
|
void |
commit()
Simple commit of this bucket transaction to store the newest version.
|
void |
commitBlocked()
Simple commit blocked of this bucket transaction to store the newest version.
|
IData |
getData(long pDataKey)
Getting the data related to a key.
|
MetaBucket |
getMetaBucket()
Getting the map with the entire mapping for retrieving meta-information related to the bundle.
|
long |
getRevision()
Getting the revision number of this transaction
|
long |
incrementDataKey()
Getting most recent data key and incrementing it.
|
boolean |
isClosed()
Check if transaction is closed.
|
void |
removeData(IData pData)
Removing the data from the storage.
|
long |
setData(IData pData)
Setting a data and storing the data in the bucket-layer.
|
String |
toString() |
protected BucketWriteTrx(ISession pSession, UberBucket pUberBucket, IBackendWriter pWriter, long pRepresentRev) throws TTException
pSession
- ISession
referencepUberBucket
- root of resourcepWriter
- writer where this transaction should write topRepresentRev
- revision representTTIOException
- if IO ErrorTTException
public long setData(IData pData) throws TTException
setData
in interface IBucketWriteTrx
pData
- the data to be stored.TTException
- if anything weird happens.public void removeData(IData pData) throws TTException
removeData
in interface IBucketWriteTrx
pData
- to be removedTTException
public IData getData(long pDataKey) throws TTIOException
getData
in interface IBucketReadTrx
pDataKey
- the key of the dataIData
TTIOException
public void commit() throws TTException
commit
in interface IBucketWriteTrx
TTException
public void commitBlocked() throws TTException
commitBlocked
in interface IBucketWriteTrx
TTException
public void clearLog() throws TTIOException
TTIOException
public boolean close() throws TTIOException
close
in interface IBucketReadTrx
TTIOException
- if anything weird happenspublic long incrementDataKey()
incrementDataKey
in interface IBucketWriteTrx
public long getRevision() throws TTIOException
getRevision
in interface IBucketReadTrx
TTIOException
- if deserialization fails.public boolean isClosed()
isClosed
in interface IBucketReadTrx
public MetaBucket getMetaBucket()
getMetaBucket
in interface IBucketReadTrx
Copyright © 2013. All Rights Reserved.