From 8809341248c62b15b78d7e6d8e06ab2ec3793c8e Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Wed, 28 Mar 2007 22:00:24 +0000 Subject: Merged 1.2-dev to trunk. --- .../carbonado/spi/SequenceValueProducer.java | 87 ---------------------- 1 file changed, 87 deletions(-) delete mode 100644 src/main/java/com/amazon/carbonado/spi/SequenceValueProducer.java (limited to 'src/main/java/com/amazon/carbonado/spi/SequenceValueProducer.java') 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. - * - *

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. - * - *

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. - * - *

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. - * - *

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; -} -- cgit v1.2.3