...
For the Object Repositories two interfaces are currently defined:
- Repository interface, that users can talk to to checkout and commit versions.
- RepositoryReplication interface, that is used by the replication mechanism.
Repository
A couple of methods are defined for this interface:
- query() - returns a sorted set of ranges describing the versions available in the repository;
- checkout(version) - checks out the specified version of the repository;
- commit(updatedConfiguration, fromVersion) - commits a new version, in case the fromVersion was the most recent version still in the repository. If not, false is returned to indicate a conflict occurred.
We will leave out updating (as in Subversion), as the first concern is to have the basic functionality working before focusing on other issues/functionality.
...
Replicating the repositories is similar to the normal repository functionality.
It adds the methods:
- query() - returns a sorted set of ranges describing the versions available in the repository;
- get(version) - get the specified version of the repository;
- put(configuration, version) - store the configuration as the specified version.
There is no functionality to get/put multiple versions at once, because once there is a stream which contains several versions there is no way to split them up again. The only way to do that is to determine the size of the stream, but then we have to have read it first.
...