|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BlobStore
Stores arbitrairy blob ("binary large object") data.
The store is a write-once, read-many type of store. An existing blob cannot be updated, rather a new one needs to be written.
The user of the BlobStore is himself responsible not to retrieve or delete a blob before it is completely written.
Method Summary | |
---|---|
void |
delete(java.lang.String name)
|
EDU.oswego.cs.dl.util.concurrent.Sync |
getAvoidSuspendLock()
Returns a lock which can be acquired to avoid that the BlobStore can go into suspension while you have this lock. |
void |
resumeWrites()
Resumes write operations (after being suspended with suspendWrites(long) . |
java.io.InputStream |
retrieve(java.lang.String name)
The caller is responsible himself that a file is not being read before it is completely written. |
java.lang.String |
store(byte[] data)
Returns an auto-generated key by which the blob can later be retrieved. |
java.lang.String |
store(java.io.InputStream is)
Returns an auto-generated key by which the blob can later be retrieved. |
boolean |
suspendWrites(long msecs)
Suspends all write operations to the blob store, after calling this method only read operation will be allowed. |
Method Detail |
---|
java.lang.String store(byte[] data) throws BlobIOException
BlobIOException
java.lang.String store(java.io.InputStream is) throws BlobIOException
BlobIOException
java.io.InputStream retrieve(java.lang.String name) throws BlobIOException, NonExistingBlobException
BlobIOException
NonExistingBlobException
void delete(java.lang.String name) throws NonExistingBlobException
NonExistingBlobException
boolean suspendWrites(long msecs) throws java.lang.InterruptedException
msecs
- max time to wait for active write operations to finish
java.lang.InterruptedException
void resumeWrites()
suspendWrites(long)
.
EDU.oswego.cs.dl.util.concurrent.Sync getAvoidSuspendLock()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |