Package com.tibco.patterns.deduplication

## Interface PairStore

- All Known Implementing Classes:
    `FileSystemPairStore`

      public interface PairStore

  Interface to access a keyed storage of batches of pairs. Batches are identified by batch Id. Batch size is also available. Some implementations may need to protect against a different Deduplicator with a different batch size from corrupting the store.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `isStored​(java.lang.String batchId, int deduplicatorBatchSize)` | Checks if the pairs of a batch have been stored yet.
    `void` | `store​(java.lang.String batchId, int deduplicatorBatchSize, java.util.List<Pair> pairs)` | Store a set of pairs against a batch id.

- - ### Method Detail

    - #### store

          void store​(java.lang.String batchId,
                     int deduplicatorBatchSize,
                     java.util.List<Pair> pairs)
              throws java.lang.Exception

      Store a set of pairs against a batch id. Any pairs previously stored against the batch id should be removed.
      Parameters:
        `batchId` - The batch id to store them against
        `deduplicatorBatchSize` - The batch size assigned in the Deduplicator that produced this batch.
        `pairs` - The pairs to store
      Throws:
        `java.lang.Exception` - if an error occurs. Deduplicators will report this exception back through the event handler.

    - #### isStored

          boolean isStored​(java.lang.String batchId,
                           int deduplicatorBatchSize)
                    throws java.lang.Exception

      Checks if the pairs of a batch have been stored yet.
      Parameters:
        `batchId` - Identifies the batch.
        `deduplicatorBatchSize` - The batch size assigned in the Deduplicator that produced the batch.
      Returns:
        true if the pairs are stored, false otherwise.
      Throws:
        `java.lang.Exception` - if an error occurs.