View Javadoc

1   /**
2    * 
3    */
4   package org.treetank.revisioning;
5   
6   import org.treetank.bucket.DataBucket;
7   import org.treetank.io.LogValue;
8   
9   /**
10   * This interface offers methods to revision data differently.
11   * 
12   * @author Sebastian Graf, University of Konstanz
13   * 
14   */
15  
16  public interface IRevisioning {
17  
18      /**
19       * Method to reconstruct a complete {@link DataBucket} with the help of party filled
20       * buckets plus a revision-delta which determines the necessary steps back.
21       * 
22       * @param pBuckets
23       *            the base of the complete {@link DataBucket}
24       * @return the complete {@link DataBucket}
25       */
26      DataBucket combineBuckets(final DataBucket[] pBuckets);
27  
28      /**
29       * Method to reconstruct a complete {@link DataBucket} for reading as well as a
30       * DataBucket for serializing with the datas to write already on there.
31       * 
32       * @param pRevisionsToRestore
33       *            number of revisions to restore
34       * @param pNewBucketKey
35       *            bucket key of the new bucket
36       * @param pBuckets
37       *            the base of the complete DataBucket
38       * @param pFullDump
39       *            boolean if entire bucket should be written. Must be triggered from extern since it is based on
40       *            the revisionToRestore-Param
41       * @return a {@link LogValue} holding a complete {@link DataBucket} for reading a one
42       *         for writing
43       */
44      LogValue combineBucketsForModification(final int pRevisionsToRestore, final long pNewBucketKey,
45          final DataBucket[] pBuckets, final boolean pFullDump);
46  
47  }