org.apache.ace.repository
Interface RepositoryReplication


public interface RepositoryReplication

The interface for replication of the data in a repository.


Method Summary
 InputStream get(long version)
          Gets the specified version.
 org.apache.ace.range.SortedRangeSet getRange()
          Determines the versions inside the repository.
 boolean put(InputStream data, long version)
          Store the stream data as the specified version.
 

Method Detail

getRange

org.apache.ace.range.SortedRangeSet getRange()
                                             throws IOException
Determines the versions inside the repository.

Throws:
IOException - If there is an error determining the current versions.

get

InputStream get(long version)
                throws IOException,
                       IllegalArgumentException
Gets the specified version.

Returns:
A stream containing the specified version's data or null if the version does not exist.
Throws:
IOException - If there is an error reading the version.
IllegalArgumentException - If the specified version is not greater than 0.

put

boolean put(InputStream data,
            long version)
            throws IOException,
                   IllegalArgumentException
Store the stream data as the specified version.

Returns:
returns True if all went fine, false if the version already existed.
Throws:
IOException - If the stream data could not be stored successfully due to I/O problems.
IllegalArgumentException - If the version number is not greater than 0.


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.