|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CachedRepository
Provides a cached repository representation, allowing the storing of local changes, without committing them to the actual repository immediately.
Method Summary | |
---|---|
InputStream |
checkout(boolean fail)
Checks our the most current version from the actual repository. |
boolean |
commit()
Commits the most current version to the actual repository. |
InputStream |
getLocal(boolean fail)
Gets the most recent version of the object. |
long |
getMostRecentVersion()
Gets the most recent version of this repository, that is, the most recent version number that is either committed (successfully) or checked out. |
boolean |
isCurrent()
Checks whether the version we have locally is current with respect to the version on the server. |
boolean |
revert()
Undoes all changes made using writeLocal() since the
last commit or checkout . |
void |
writeLocal(InputStream data)
Writes the most recent version of the object. |
Methods inherited from interface org.apache.ace.repository.Repository |
---|
checkout, commit, getRange |
Method Detail |
---|
InputStream checkout(boolean fail) throws IOException
fail
- Indicates that this method should throw an IOException when no data
is available. Setting it to false
will make it return an
empty stream in that case.
IOException
- Is thrown when the actual repository's commit does.boolean commit() throws IOException
IOException
- Is thrown when the actual repository's commit does.InputStream getLocal(boolean fail) throws IOException
fail
- Indicates that this method should throw an IOException when no data
is available. Setting it to false
will make it return an
empty stream in that case.
IOException
- Thrown when there is a problem retrieving the data.void writeLocal(InputStream data) throws IOException
IOException
- Thrown when there is a problem storing the data.boolean revert() throws IOException
writeLocal()
since the
last commit
or checkout
.
IOException
long getMostRecentVersion()
boolean isCurrent() throws IOException
IOException
- Thrown when an error occurs communicating with the server.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |