code: @Override
      public int nextIntValue() throws PersistException {
          try {
              synchronized (mStoredSequence) {
                  long initial = mStoredSequence.getInitialValue();
                  if (initial >= 0x100000000L) {
                      throw new PersistException
                          ("Sequence initial value too large to support 32-bit ints: " +
                           mStoredSequence.getName() + ", initial: " + initial);
                  }
                  long next = nextUnadjustedValue();
                  if (next >= Long.MIN_VALUE + 0x100000000L) {
                      // Everytime we throw this exception, a long sequence value
                      // has been lost. This seems fairly benign.
                      throw new PersistException
                          ("Sequence exhausted for 32-bit ints: " + mStoredSequence.getName() +
                           ", next: " + (next + Long.MIN_VALUE + initial));
                  }
                  return (int) (next + Long.MIN_VALUE + initial);
              }
          } catch (FetchException e) {
              throw e.toPersistException();
          }
      }
docs: 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.
  
  <p>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 for int values.