code: public boolean returnReservedValues() throws FetchException, PersistException {
          synchronized (mStoredSequence) {
              if (mHasReservedValues) {
                  Transaction txn = mRepository.enterTopTransaction(null);
                  txn.setForUpdate(true);
                  try {
                      // Compare known StoredSequence with current persistent
                      // one. If same, then reserved values can be returned.
                      StoredSequence current = mStorage.prepare();
                      current.setName(mStoredSequence.getName());
                      if (current.tryLoad() && current.equals(mStoredSequence)) {
                          mStoredSequence.setNextValue(mNextValue + mIncrement);
                          mStoredSequence.update();
                          txn.commit();
                          mHasReservedValues = false;
                          return true;
                      }
                  } finally {
                      txn.exit();
                  }
              }
          }
          return false;
      }
docs: 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.
  
  <p>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.
  
  @return true if reserved values were returned