summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/spi/SequenceValueProducer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/amazon/carbonado/spi/SequenceValueProducer.java')
-rw-r--r--src/main/java/com/amazon/carbonado/spi/SequenceValueProducer.java87
1 files changed, 0 insertions, 87 deletions
diff --git a/src/main/java/com/amazon/carbonado/spi/SequenceValueProducer.java b/src/main/java/com/amazon/carbonado/spi/SequenceValueProducer.java
deleted file mode 100644
index 659de89..0000000
--- a/src/main/java/com/amazon/carbonado/spi/SequenceValueProducer.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright 2006 Amazon Technologies, Inc. or its affiliates.
- * Amazon, Amazon.com and Carbonado are trademarks or registered trademarks
- * of Amazon Technologies, Inc. or its affiliates. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.amazon.carbonado.spi;
-
-import com.amazon.carbonado.PersistException;
-
-/**
- * Produces values for sequences.
- *
- * @author Brian S O'Neill
- * @see com.amazon.carbonado.Sequence
- */
-public interface SequenceValueProducer {
- /**
- * 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.
- */
- 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.
- *
- * <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.
- */
- public int nextIntValue() throws PersistException;
-
- /**
- * Returns the next decimal string value from the sequence, which remains
- * positive. 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.
- */
- public String nextDecimalValue() throws PersistException;
-
- /**
- * Returns the next numerical string value from the sequence, which remains
- * positive. 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.
- *
- * @param radix use 2 for binary, 10 for decimal, 16 for hex. Max is 36.
- * @param minLength ensure string is at least this long (padded with zeros if
- * necessary) to ensure proper string sort
- * @throws PersistException for fetch/persist failure or if sequence is exhausted.
- */
- public String nextNumericalValue(int radix, int minLength) throws PersistException;
-}