Class 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.
    • Constructor Detail

      • TransBlob

        public TransBlob​(ComponentId cid,
                         org.apache.jena.dboe.base.file.BufferChannel file)
    • Method Detail

      • setBlob

        public void setBlob​(java.nio.ByteBuffer bb)
        Set the byte buffer. The byte buffer should not be accessed except by getBlob(). We avoid a copy in and copy out - we trust the caller. The byte buffer should be configured for read if used with getString().
      • getBlob

        public java.nio.ByteBuffer getBlob()
      • setString

        public void setString​(java.lang.String dataStr)
        Set data from string - convenience operation
      • getString

        public java.lang.String getString()
        Get data as string - convenience operation
      • cleanStart

        public void cleanStart()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object