| Constructor and Description |
|---|
DiskBlobStore(File dir) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
changed(String version,
Collection<String> blobs,
File entry,
Collection<String> previousVersions) |
boolean |
equals(Object obj) |
boolean |
erase()
Remove all blobs from all transactions and all the history.
|
protected File |
getDirectory() |
String[] |
getRecentModifications()
Most recent blobs that have committed modifications.
|
int |
hashCode() |
protected void |
lock() |
protected boolean |
mkdirs(File dir) |
protected void |
newBlobVersion(String version,
File file) |
DiskBlobVersion |
newVersion()
Create a new
BlobVersion using a generated version ID. |
DiskBlobVersion |
newVersion(String version)
Create a new
BlobVersion maybe with the given unique ID. |
BlobObject |
open(String uri)
Opens a
BlobObject for reading or writing. |
protected OutputStream |
openOutputStream(File file) |
DiskBlobVersion |
openVersion(String version)
Open a read-only
BlobVersion of the blob(s) with this version. |
protected Writer |
openWriter(File file,
boolean append) |
protected Lock |
readLock() |
protected void |
removeFromIndex(String erasing) |
String |
toString() |
protected void |
unlock() |
protected boolean |
unwatch(String uri,
DiskListener listener) |
protected void |
watch(String uri,
DiskListener listener) |
public DiskBlobStore(File dir) throws IOException
IOExceptionpublic BlobObject open(String uri) throws IOException
BlobStoreBlobObject for reading or writing. Any changes to this
blob are visible to other blobs of the same uri when a call
to the FileObject.delete() returns or a call to the
BlobObject.openWriter()'s Writer.close() returns or a
call to the FileObject.openOutputStream()'s
OutputStream.close() returns.open in interface BlobStoreIOExceptionpublic DiskBlobVersion newVersion() throws IOException
BlobStoreBlobVersion using a generated version ID.newVersion in interface BlobStoreIOExceptionpublic DiskBlobVersion newVersion(String version) throws IOException
BlobStoreBlobVersion maybe with the given unique ID.
BlobVersion returned from this method using a previously assigned
version have undefined consequences.newVersion in interface BlobStoreversion - to uniquely identify new blob versions, this may or may not
actually be usedIOExceptionpublic DiskBlobVersion openVersion(String version) throws IOException
BlobStoreBlobVersion of the blob(s) with this version.
Only blobs with the given version are accessible using the returned
BlobVersion.openVersion in interface BlobStoreversion - version of blob to readBlobVersionIOExceptionpublic String[] getRecentModifications() throws IOException
BlobStoregetRecentModifications in interface BlobStoreIOExceptionpublic boolean erase()
throws IOException
BlobStoreerase in interface BlobStoretrue if the store was successfully deleted.IOExceptionprotected File getDirectory()
protected boolean mkdirs(File dir)
protected OutputStream openOutputStream(File file) throws IOException
IOExceptionprotected Writer openWriter(File file, boolean append) throws IOException
IOExceptionprotected void watch(String uri, DiskListener listener)
protected boolean unwatch(String uri, DiskListener listener)
protected Lock readLock()
protected void lock()
protected void unlock()
protected void changed(String version, Collection<String> blobs, File entry, Collection<String> previousVersions) throws IOException
IOExceptionprotected void newBlobVersion(String version, File file) throws IOException
IOExceptionprotected void removeFromIndex(String erasing) throws IOException
IOExceptionCopyright © 2016 Chair of Distributed Information Systems - University of Passau. All rights reserved.