java.lang.Object
org.apache.jena.dboe.transaction.txn.TransactionalComponentLifecycle<org.apache.jena.dboe.trans.data.TransBlob.BlobState>
org.apache.jena.dboe.trans.data.TransBlob
- All Implemented Interfaces:
TransactionalComponent
public class TransBlob
extends TransactionalComponentLifecycle<org.apache.jena.dboe.trans.data.TransBlob.BlobState>
Manage a single binary (not too large) object.
It is written and read from a file in one action,
so changes completely replace the original contents.
The whole object is written to the journal during prepare.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.jena.dboe.transaction.txn.TransactionalComponentLifecycle
TransactionalComponentLifecycle.ComponentState<X extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionTransBlob(ComponentId cid, org.apache.jena.dboe.base.file.BufferChannel file) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidgetBlob()Get data as string - convenience operationvoidrecover(ByteBuffer ref) voidsetBlob(ByteBuffer bb) Set the byte buffer.voidSet data from string - convenience operationvoidtoString()Methods inherited from class org.apache.jena.dboe.transaction.txn.TransactionalComponentLifecycle
abort, attach, begin, commit, commitEnd, commitPrepare, complete, detach, getComponentId, getComponentState, promote, setComponentState, shutdown
-
Constructor Details
-
TransBlob
-
-
Method Details
-
setBlob
Set the byte buffer. The byte buffer should not be accessed except bygetBlob(). We avoid a copy in and copy out - we trust the caller. The byte buffer should be configured for read if used withgetString(). -
getBlob
-
setString
Set data from string - convenience operation -
getString
Get data as string - convenience operation -
startRecovery
public void startRecovery()- Specified by:
startRecoveryin interfaceTransactionalComponent- Specified by:
startRecoveryin classTransactionalComponentLifecycle<org.apache.jena.dboe.trans.data.TransBlob.BlobState>
-
recover
- Specified by:
recoverin interfaceTransactionalComponent- Specified by:
recoverin classTransactionalComponentLifecycle<org.apache.jena.dboe.trans.data.TransBlob.BlobState>
-
finishRecovery
public void finishRecovery()- Specified by:
finishRecoveryin interfaceTransactionalComponent- Specified by:
finishRecoveryin classTransactionalComponentLifecycle<org.apache.jena.dboe.trans.data.TransBlob.BlobState>
-
cleanStart
public void cleanStart() -
toString
-