|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.store.blob.disk.DiskBlobVersion
public class DiskBlobVersion
| Constructor Summary | |
|---|---|
protected |
DiskBlobVersion(DiskBlobStore store,
String version,
File file)
|
| Method Summary | |
|---|---|
protected void |
addOpenBlobs(Collection<String> set)
|
void |
commit()
Makes the changes to the open blobs in this BlobVersion available
to others. |
boolean |
equals(Object obj)
|
boolean |
erase()
Reverts all committed changes to blobs from this BlobVersion. |
protected File |
getDirectory()
|
String[] |
getModifications()
Blobs that have been modified in this version. |
protected String |
getVersion()
|
int |
hashCode()
|
protected boolean |
isClosed()
|
protected boolean |
isObsolete()
|
BlobObject |
open(String uri)
Opens a BlobObject for reading or writing if this
BlobVersion has not be committed. |
void |
prepare()
Prevents any further changes to the store from other threads until BlobVersion.commit() or BlobVersion.rollback() is called from this thread. |
protected Lock |
readLock()
|
void |
rollback()
Aborts all uncommitted changes to blobs, restoring the initial state of this BlobVersion. |
String |
toString()
|
protected boolean |
unwatch(String uri,
DiskListener listener)
|
protected void |
watch(String uri,
DiskListener listener)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected DiskBlobVersion(DiskBlobStore store,
String version,
File file)
throws IOException
IOException| Method Detail |
|---|
public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
public String[] getModifications()
throws IOException
BlobVersion
getModifications in interface BlobVersionIOExceptionpublic BlobObject open(String uri)
BlobVersionBlobObject for reading or writing if this
BlobVersion has not be committed. Opens a read-only
BlobObject using this version if this BlobVersion is
closed.
open in interface BlobVersion
public void prepare()
throws IOException
BlobVersionBlobVersion.commit() or BlobVersion.rollback() is called from this thread.
Checks that the blobs read or written in this BlobVersion were
not changed in another BlobVersion since they were opened.
prepare in interface BlobVersionIOException - if a blob opened in this BlobVersion had since
changed.
public void commit()
throws IOException
BlobVersionBlobVersion available
to others. This method can only be called at most once for a given
BlobVersion; once this method is called this state is closed and
only the modified blobs can be opened.
commit in interface BlobVersionIOException - if a blob opened in this BlobVersion had since
changed.public void rollback()
BlobVersionBlobVersion.
rollback in interface BlobVersion
public boolean erase()
throws IOException
BlobVersionBlobVersion.
erase in interface BlobVersiontrue if all blobs of this version were removed
successfully.
IOExceptionprotected boolean isClosed()
protected void addOpenBlobs(Collection<String> set)
protected boolean isObsolete()
throws IOException
IOExceptionprotected File getDirectory()
protected String getVersion()
protected void watch(String uri,
DiskListener listener)
protected boolean unwatch(String uri,
DiskListener listener)
protected Lock readLock()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||