org.akubraproject.txn
Class AbstractTransactionalConnection.TxnBlob

java.lang.Object
  extended by org.akubraproject.impl.AbstractBlob
      extended by org.akubraproject.txn.AbstractTransactionalConnection.TxnBlob
All Implemented Interfaces:
org.akubraproject.Blob
Enclosing class:
AbstractTransactionalConnection

protected class AbstractTransactionalConnection.TxnBlob
extends org.akubraproject.impl.AbstractBlob

A transactional blob implementation. This blob caches underlying infos such as the store-id and the store-blob, and hence only works properly in conjunction with the blob-cache which guarantees only one instance of this class per blob-id at any given time.


Field Summary
 
Fields inherited from class org.akubraproject.impl.AbstractBlob
id, owner
 
Constructor Summary
AbstractTransactionalConnection.TxnBlob(URI blobId, Map<String,String> hints)
           
 
Method Summary
 void delete()
           
 boolean exists()
           
 URI getCanonicalId()
           
 long getSize()
           
 org.akubraproject.Blob moveTo(URI blobId, Map<String,String> hints)
           
 InputStream openInputStream()
           
 OutputStream openOutputStream(long estimatedSize, boolean overwrite)
           
 
Methods inherited from class org.akubraproject.impl.AbstractBlob
ensureOpen, equals, getConnection, getId, hashCode, same
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTransactionalConnection.TxnBlob

public AbstractTransactionalConnection.TxnBlob(URI blobId,
                                               Map<String,String> hints)
                                        throws IOException
Throws:
IOException
Method Detail

getCanonicalId

public URI getCanonicalId()
Specified by:
getCanonicalId in interface org.akubraproject.Blob
Overrides:
getCanonicalId in class org.akubraproject.impl.AbstractBlob

exists

public boolean exists()
               throws IOException
Throws:
IOException

delete

public void delete()
            throws IOException
Throws:
IOException

moveTo

public org.akubraproject.Blob moveTo(URI blobId,
                                     Map<String,String> hints)
                              throws IOException
Throws:
IOException

getSize

public long getSize()
             throws IOException
Throws:
IOException

openInputStream

public InputStream openInputStream()
                            throws IOException
Throws:
IOException

openOutputStream

public OutputStream openOutputStream(long estimatedSize,
                                     boolean overwrite)
                              throws IOException,
                                     org.akubraproject.DuplicateBlobException
Throws:
IOException
org.akubraproject.DuplicateBlobException


Copyright © 2009-2012 DuraSpace. All Rights Reserved.