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:
org.apache.jena.dboe.transaction.txn.TransactionalComponent
public class TransBlob
extends org.apache.jena.dboe.transaction.txn.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
org.apache.jena.dboe.transaction.txn.TransactionalComponentLifecycle.ComponentState<X extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionTransBlob(org.apache.jena.dboe.transaction.txn.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
public TransBlob(org.apache.jena.dboe.transaction.txn.ComponentId cid, org.apache.jena.dboe.base.file.BufferChannel file)
-
-
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 interfaceorg.apache.jena.dboe.transaction.txn.TransactionalComponent- Specified by:
startRecoveryin classorg.apache.jena.dboe.transaction.txn.TransactionalComponentLifecycle<org.apache.jena.dboe.trans.data.TransBlob.BlobState>
-
recover
- Specified by:
recoverin interfaceorg.apache.jena.dboe.transaction.txn.TransactionalComponent- Specified by:
recoverin classorg.apache.jena.dboe.transaction.txn.TransactionalComponentLifecycle<org.apache.jena.dboe.trans.data.TransBlob.BlobState>
-
finishRecovery
public void finishRecovery()- Specified by:
finishRecoveryin interfaceorg.apache.jena.dboe.transaction.txn.TransactionalComponent- Specified by:
finishRecoveryin classorg.apache.jena.dboe.transaction.txn.TransactionalComponentLifecycle<org.apache.jena.dboe.trans.data.TransBlob.BlobState>
-
cleanStart
public void cleanStart() -
toString
-