From d479253768d296a40b4f699e1de9b03c7146a97a Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 3 Dec 2013 14:03:28 -0800 Subject: Adding javadocs and Carbonado User Guide --- .../carbonado/sequence/SequenceValueGenerator.html | 512 +++++++++++++++++++++ 1 file changed, 512 insertions(+) create mode 100644 apidocs/com/amazon/carbonado/sequence/SequenceValueGenerator.html (limited to 'apidocs/com/amazon/carbonado/sequence/SequenceValueGenerator.html') diff --git a/apidocs/com/amazon/carbonado/sequence/SequenceValueGenerator.html b/apidocs/com/amazon/carbonado/sequence/SequenceValueGenerator.html new file mode 100644 index 0000000..d4dd7a4 --- /dev/null +++ b/apidocs/com/amazon/carbonado/sequence/SequenceValueGenerator.html @@ -0,0 +1,512 @@ + + + + + + +SequenceValueGenerator (Carbonado 1.2.3 API) + + + + + + + +
+ + + + + +
+ + + +
+
com.amazon.carbonado.sequence
+

Class SequenceValueGenerator

+
+
+ +
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      SequenceValueGenerator(Repository repo, + java.lang.String name) +
      Construct a new SequenceValueGenerator which might create persistent + sequence data if it does not exist.
      +
      SequenceValueGenerator(Repository repo, + java.lang.String name, + long initialValue, + int increment) +
      Construct a new SequenceValueGenerator which might create persistent + sequence data if it does not exist.
      +
      SequenceValueGenerator(Repository repo, + java.lang.String name, + long initialValue, + int increment, + int reserveAmount) +
      Construct a new SequenceValueGenerator which might create persistent + sequence data if it does not exist.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      intnextIntValue() +
      Returns the next value from the sequence, which may wrap negative if all + positive values are exhausted.
      +
      longnextLongValue() +
      Returns the next value from the sequence, which may wrap negative if all + positive values are exhausted.
      +
      voidreset(int initialValue) +
      Reset the sequence.
      +
      booleanreturnReservedValues() +
      Allow any unused reserved values to be returned for re-use.
      +
      + +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SequenceValueGenerator

        +
        public SequenceValueGenerator(Repository repo,
        +                      java.lang.String name)
        +                       throws RepositoryException
        +
        Construct a new SequenceValueGenerator which might create persistent + sequence data if it does not exist. The initial sequence value is one, + and the increment is one.
        +
        Parameters:
        repo - repository to persist sequence data
        name - name of sequence
        +
        Throws:
        +
        RepositoryException
        +
      • +
      + + + +
        +
      • +

        SequenceValueGenerator

        +
        public SequenceValueGenerator(Repository repo,
        +                      java.lang.String name,
        +                      long initialValue,
        +                      int increment)
        +                       throws RepositoryException
        +
        Construct a new SequenceValueGenerator which might create persistent + sequence data if it does not exist.
        +
        Parameters:
        repo - repository to persist sequence data
        name - name of sequence
        initialValue - initial sequence value, if sequence needs to be created
        increment - amount to increment sequence by
        +
        Throws:
        +
        RepositoryException
        +
      • +
      + + + +
        +
      • +

        SequenceValueGenerator

        +
        public SequenceValueGenerator(Repository repo,
        +                      java.lang.String name,
        +                      long initialValue,
        +                      int increment,
        +                      int reserveAmount)
        +                       throws RepositoryException
        +
        Construct a new SequenceValueGenerator which might create persistent + sequence data if it does not exist.
        +
        Parameters:
        repo - repository to persist sequence data
        name - name of sequence
        initialValue - initial sequence value, if sequence needs to be created
        increment - amount to increment sequence by
        reserveAmount - amount of sequence values to reserve
        +
        Throws:
        +
        RepositoryException
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        nextLongValue

        +
        public long nextLongValue()
        +                   throws PersistException
        +
        Returns the next value from the sequence, which may wrap negative if all + positive values are exhausted. When sequence wraps back to initial + value, the sequence is fully exhausted, and an exception is thrown to + indicate this. + +

        Note: this method throws PersistException even for fetch failures + since this method is called by insert operations. Insert operations can + only throw a PersistException.

        +
        Throws:
        +
        PersistException - for fetch/persist failure or if sequence is exhausted.
        +
      • +
      + + + +
        +
      • +

        nextIntValue

        +
        public int nextIntValue()
        +                 throws PersistException
        +
        Returns the next value from the sequence, which may wrap negative if all + positive values are exhausted. When sequence wraps back to initial + value, the sequence is fully exhausted, and an exception is thrown to + indicate this. + +

        Note: this method throws PersistException even for fetch failures + since this method is called by insert operations. Insert operations can + only throw a PersistException.

        +
        +
        Specified by:
        +
        nextIntValue in interface SequenceValueProducer
        +
        Overrides:
        +
        nextIntValue in class AbstractSequenceValueProducer
        +
        Throws:
        +
        PersistException - for fetch/persist failure or if sequence is + exhausted for int values.
        +
      • +
      + + + +
        +
      • +

        returnReservedValues

        +
        public boolean returnReservedValues()
        +                             throws FetchException,
        +                                    PersistException
        +
        Allow any unused reserved values to be returned for re-use. If the + repository is shared by other processes, then reserved values might not + be returnable. + +

        This method should be called during the shutdown process of a + repository, although calling it does not invalidate this + SequenceValueGenerator. If getNextValue is called again, it will reserve + values again.

        +
        Returns:
        true if reserved values were returned
        +
        Throws:
        +
        FetchException
        +
        PersistException
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + +
+ + +

Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.

+ + -- cgit v1.2.3