Return-Path: X-Original-To: apmail-incubator-connectors-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-connectors-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 747659C41 for ; Sun, 18 Dec 2011 08:37:29 +0000 (UTC) Received: (qmail 54881 invoked by uid 500); 18 Dec 2011 08:37:29 -0000 Delivered-To: apmail-incubator-connectors-commits-archive@incubator.apache.org Received: (qmail 54806 invoked by uid 500); 18 Dec 2011 08:37:28 -0000 Mailing-List: contact connectors-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: connectors-dev@incubator.apache.org Delivered-To: mailing list connectors-commits@incubator.apache.org Received: (qmail 54790 invoked by uid 99); 18 Dec 2011 08:37:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Dec 2011 08:37:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Dec 2011 08:37:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4C64D2388A9B; Sun, 18 Dec 2011 08:37:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1220353 [5/11] - in /incubator/lcf/branches/CONNECTORS-286/warthog-reimport: ./ src/main/java/org/apache/warthog/api/ src/main/java/org/apache/warthog/bytekeyvalue/ src/main/java/org/apache/warthog/common/ src/main/java/org/apache/warthog/... Date: Sun, 18 Dec 2011 08:36:56 -0000 To: connectors-commits@incubator.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111218083702.4C64D2388A9B@eris.apache.org> Modified: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/LongKey.java URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/LongKey.java?rev=1220353&r1=1220352&r2=1220353&view=diff ============================================================================== --- incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/LongKey.java (original) +++ incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/LongKey.java Sun Dec 18 08:36:52 2011 @@ -1,52 +1,52 @@ -/* $Id: LongKey.java 1208951 2011-12-01 05:05:52Z kwright $ */ - -/** -* Licensed to the Apache Software Foundation (ASF) under one or more -* contributor license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright ownership. -* The ASF licenses this file to You 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 org.apache.warthog.common; - -import org.apache.warthog.api.*; -import org.apache.warthog.transactionalkeyvaluestore.*; - -/** Long key. -*/ -public class LongKey extends LongValue implements WHKey -{ - public LongKey(long value) - { - super(value); - } - - public LongKey(byte[] bytes) - { - super(bytes); - } - - /** Calculate the hash function. */ - public long getHashCode() - { - return calculateHashCode(value); - } - - public static long calculateHashCode(long value) - { - return (value << 5) ^ (value >> 3); - } - -} - - +/* $Id$ */ + +/** +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You 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 org.apache.warthog.common; + +import org.apache.warthog.api.*; +import org.apache.warthog.transactionalkeyvaluestore.*; + +/** Long key. +*/ +public class LongKey extends LongValue implements WHKey +{ + public LongKey(long value) + { + super(value); + } + + public LongKey(byte[] bytes) + { + super(bytes); + } + + /** Calculate the hash function. */ + public long getHashCode() + { + return calculateHashCode(value); + } + + public static long calculateHashCode(long value) + { + return (value << 5) ^ (value >> 3); + } + +} + + Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/LongKey.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/LongKey.java ------------------------------------------------------------------------------ svn:keywords = Id Modified: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/LongValue.java URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/LongValue.java?rev=1220353&r1=1220352&r2=1220353&view=diff ============================================================================== --- incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/LongValue.java (original) +++ incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/LongValue.java Sun Dec 18 08:36:52 2011 @@ -1,103 +1,103 @@ -/* $Id: LongValue.java 1208116 2011-11-29 22:36:26Z kwright $ */ - -/** -* Licensed to the Apache Software Foundation (ASF) under one or more -* contributor license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright ownership. -* The ASF licenses this file to You 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 org.apache.warthog.common; - -import org.apache.warthog.api.*; -import org.apache.warthog.transactionalkeyvaluestore.*; - -/** Long value, serializable. -*/ -public class LongValue implements WHValue,WHKeyValue,WHRowID -{ - long value; - - public LongValue(long value) - { - this.value = value; - } - - public LongValue(byte[] bytes) - { - value = readObject(new BufferPointer(bytes)); - } - - public byte[] serializeObject() - { - byte[] rval = new byte[sizeObject()]; - writeObject(new BufferPointer(rval),value); - return rval; - } - - /** Check if equals (classes must already agree) */ - public boolean isEquals(WHKeyValue value) - { - LongValue k = (LongValue)value; - return k.value == this.value; - } - - public long getValue() - { - return value; - } - - public int hashCode() - { - return (int)((value << 5) ^ (value >> 3)); - } - - public boolean equals(Object o) - { - if (this.getClass() != o.getClass()) - return false; - return ((LongValue)o).value == value; - } - - public static long readObject(BufferPointer bp) - { - long value = (((long)bp.readValue()) & 0xffL); - value += ((((long)bp.readValue()) << 8) & 0xff00L); - value += ((((long)bp.readValue()) << 16) & 0xff0000L); - value += ((((long)bp.readValue()) << 24) & 0xff000000L); - value += ((((long)bp.readValue()) << 32) & 0xff00000000L); - value += ((((long)bp.readValue()) << 40) & 0xff0000000000L); - value += ((((long)bp.readValue()) << 48) & 0xff000000000000L); - value += ((((long)bp.readValue()) << 56) & 0xff00000000000000L); - return value; - } - - public static int sizeObject() - { - return 8; - } - - public static void writeObject(BufferPointer bp, long value) - { - bp.writeValue((byte)(value & 0xffL)); - bp.writeValue((byte)((value >> 8) & 0xffL)); - bp.writeValue((byte)((value >> 16) & 0xffL)); - bp.writeValue((byte)((value >> 24) & 0xffL)); - bp.writeValue((byte)((value >> 32) & 0xffL)); - bp.writeValue((byte)((value >> 40) & 0xffL)); - bp.writeValue((byte)((value >> 48) & 0xffL)); - bp.writeValue((byte)((value >> 56) & 0xffL)); - } -} - - +/* $Id$ */ + +/** +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You 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 org.apache.warthog.common; + +import org.apache.warthog.api.*; +import org.apache.warthog.transactionalkeyvaluestore.*; + +/** Long value, serializable. +*/ +public class LongValue implements WHValue,WHKeyValue,WHRowID +{ + long value; + + public LongValue(long value) + { + this.value = value; + } + + public LongValue(byte[] bytes) + { + value = readObject(new BufferPointer(bytes)); + } + + public byte[] serializeObject() + { + byte[] rval = new byte[sizeObject()]; + writeObject(new BufferPointer(rval),value); + return rval; + } + + /** Check if equals (classes must already agree) */ + public boolean isEquals(WHKeyValue value) + { + LongValue k = (LongValue)value; + return k.value == this.value; + } + + public long getValue() + { + return value; + } + + public int hashCode() + { + return (int)((value << 5) ^ (value >> 3)); + } + + public boolean equals(Object o) + { + if (this.getClass() != o.getClass()) + return false; + return ((LongValue)o).value == value; + } + + public static long readObject(BufferPointer bp) + { + long value = (((long)bp.readValue()) & 0xffL); + value += ((((long)bp.readValue()) << 8) & 0xff00L); + value += ((((long)bp.readValue()) << 16) & 0xff0000L); + value += ((((long)bp.readValue()) << 24) & 0xff000000L); + value += ((((long)bp.readValue()) << 32) & 0xff00000000L); + value += ((((long)bp.readValue()) << 40) & 0xff0000000000L); + value += ((((long)bp.readValue()) << 48) & 0xff000000000000L); + value += ((((long)bp.readValue()) << 56) & 0xff00000000000000L); + return value; + } + + public static int sizeObject() + { + return 8; + } + + public static void writeObject(BufferPointer bp, long value) + { + bp.writeValue((byte)(value & 0xffL)); + bp.writeValue((byte)((value >> 8) & 0xffL)); + bp.writeValue((byte)((value >> 16) & 0xffL)); + bp.writeValue((byte)((value >> 24) & 0xffL)); + bp.writeValue((byte)((value >> 32) & 0xffL)); + bp.writeValue((byte)((value >> 40) & 0xffL)); + bp.writeValue((byte)((value >> 48) & 0xffL)); + bp.writeValue((byte)((value >> 56) & 0xffL)); + } +} + + Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/LongValue.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/LongValue.java ------------------------------------------------------------------------------ svn:keywords = Id Modified: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringArray.java URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringArray.java?rev=1220353&r1=1220352&r2=1220353&view=diff ============================================================================== --- incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringArray.java (original) +++ incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringArray.java Sun Dec 18 08:36:52 2011 @@ -1,128 +1,128 @@ -/* $Id: StringArray.java 1207794 2011-11-29 08:57:22Z kwright $ */ - -/** -* Licensed to the Apache Software Foundation (ASF) under one or more -* contributor license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright ownership. -* The ASF licenses this file to You 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 org.apache.warthog.common; - -import org.apache.warthog.api.*; -import org.apache.warthog.transactionalkeyvaluestore.*; - -/** String array, serializable. -*/ -public class StringArray implements WHValue,WHKeyValue -{ - String[] value; - - public StringArray(String[] value) - { - this.value = value; - } - - public StringArray(byte[] bytes) - { - value = readObject(new BufferPointer(bytes)); - } - - public byte[] serializeObject() - { - byte[] rval = new byte[sizeObject(value)]; - writeObject(new BufferPointer(rval),value); - return rval; - } - - /** Check if equals (classes must already agree) */ - public boolean isEquals(WHKeyValue value) - { - StringArray other = (StringArray)value; - return compareObject(other.value,this.value); - } - - public String[] getValue() - { - return value; - } - - public int hashCode() - { - int rval = 0; - for (int i = 0 ; i < value.length ; i++) - { - rval += value[i].hashCode(); - } - return rval; - } - - public boolean equals(Object o) - { - if (this.getClass() != o.getClass()) - return false; - StringArray sa = (StringArray)o; - if (sa.value.length != value.length) - return false; - for (int i = 0 ; i < value.length ; i++) - { - if (!sa.value[i].equals(value[i])) - return false; - } - return true; - } - - public static String[] readObject(BufferPointer bp) - { - int size = IntegerValue.readObject(bp); - String[] rval = new String[size]; - for (int i = 0 ; i < size ; i++) - { - rval[i] = StringValue.readObject(bp); - } - return rval; - } - - public static int sizeObject(String[] value) - { - int rval = IntegerValue.sizeObject(); - for (int i = 0 ; i < value.length ; i++) - { - rval += StringValue.sizeObject(value[i]); - } - return rval; - } - - public static void writeObject(BufferPointer bp, String[] value) - { - IntegerValue.writeObject(bp,value.length); - for (int i = 0 ; i < value.length ; i++) - { - StringValue.writeObject(bp,value[i]); - } - } - - public static boolean compareObject(String[] value, String[] otherValue) - { - if (otherValue.length != value.length) - return false; - for (int i = 0 ; i < otherValue.length ; i++) - { - if (!otherValue[i].equals(value[i])) - return false; - } - return true; - } -} - - +/* $Id$ */ + +/** +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You 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 org.apache.warthog.common; + +import org.apache.warthog.api.*; +import org.apache.warthog.transactionalkeyvaluestore.*; + +/** String array, serializable. +*/ +public class StringArray implements WHValue,WHKeyValue +{ + String[] value; + + public StringArray(String[] value) + { + this.value = value; + } + + public StringArray(byte[] bytes) + { + value = readObject(new BufferPointer(bytes)); + } + + public byte[] serializeObject() + { + byte[] rval = new byte[sizeObject(value)]; + writeObject(new BufferPointer(rval),value); + return rval; + } + + /** Check if equals (classes must already agree) */ + public boolean isEquals(WHKeyValue value) + { + StringArray other = (StringArray)value; + return compareObject(other.value,this.value); + } + + public String[] getValue() + { + return value; + } + + public int hashCode() + { + int rval = 0; + for (int i = 0 ; i < value.length ; i++) + { + rval += value[i].hashCode(); + } + return rval; + } + + public boolean equals(Object o) + { + if (this.getClass() != o.getClass()) + return false; + StringArray sa = (StringArray)o; + if (sa.value.length != value.length) + return false; + for (int i = 0 ; i < value.length ; i++) + { + if (!sa.value[i].equals(value[i])) + return false; + } + return true; + } + + public static String[] readObject(BufferPointer bp) + { + int size = IntegerValue.readObject(bp); + String[] rval = new String[size]; + for (int i = 0 ; i < size ; i++) + { + rval[i] = StringValue.readObject(bp); + } + return rval; + } + + public static int sizeObject(String[] value) + { + int rval = IntegerValue.sizeObject(); + for (int i = 0 ; i < value.length ; i++) + { + rval += StringValue.sizeObject(value[i]); + } + return rval; + } + + public static void writeObject(BufferPointer bp, String[] value) + { + IntegerValue.writeObject(bp,value.length); + for (int i = 0 ; i < value.length ; i++) + { + StringValue.writeObject(bp,value[i]); + } + } + + public static boolean compareObject(String[] value, String[] otherValue) + { + if (otherValue.length != value.length) + return false; + for (int i = 0 ; i < otherValue.length ; i++) + { + if (!otherValue[i].equals(value[i])) + return false; + } + return true; + } +} + + Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringArray.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringArray.java ------------------------------------------------------------------------------ svn:keywords = Id Modified: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringComparatorAscending.java URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringComparatorAscending.java?rev=1220353&r1=1220352&r2=1220353&view=diff ============================================================================== --- incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringComparatorAscending.java (original) +++ incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringComparatorAscending.java Sun Dec 18 08:36:52 2011 @@ -1,51 +1,51 @@ -/* $Id: StringComparatorAscending.java 1206460 2011-11-26 15:27:37Z kwright $ */ - -/** -* Licensed to the Apache Software Foundation (ASF) under one or more -* contributor license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright ownership. -* The ASF licenses this file to You 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 org.apache.warthog.common; - -import org.apache.warthog.api.*; - -/** Class that compares string values, and sorts in ascending order. -*/ -public class StringComparatorAscending implements WHComparator -{ - /** Comparison method. - * This is only ever used to compare values; it cannot be used to compare null vs. non-null. - */ - public int compare(WHValue leftValue, WHValue rightValue) - throws WHException - { - if (leftValue == null && rightValue == null) - return RESULT_EQUALS; - // Sort null values to the end - if (leftValue == null) - return RESULT_LESS; - if (rightValue == null) - return RESULT_GREATER; - if (!(leftValue instanceof StringValue) || !(rightValue instanceof StringValue)) - throw new WHException("Cannot compare anything other than StringValues here"); - String leftStringValue = ((StringValue)leftValue).getValue(); - String rightStringValue = ((StringValue)rightValue).getValue(); - int compare = leftStringValue.compareTo(rightStringValue); - if (compare == 0) - return RESULT_EQUALS; - return (compare < 0)?RESULT_GREATER:RESULT_LESS; - } - +/* $Id$ */ + +/** +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You 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 org.apache.warthog.common; + +import org.apache.warthog.api.*; + +/** Class that compares string values, and sorts in ascending order. +*/ +public class StringComparatorAscending implements WHComparator +{ + /** Comparison method. + * This is only ever used to compare values; it cannot be used to compare null vs. non-null. + */ + public int compare(WHValue leftValue, WHValue rightValue) + throws WHException + { + if (leftValue == null && rightValue == null) + return RESULT_EQUALS; + // Sort null values to the end + if (leftValue == null) + return RESULT_LESS; + if (rightValue == null) + return RESULT_GREATER; + if (!(leftValue instanceof StringValue) || !(rightValue instanceof StringValue)) + throw new WHException("Cannot compare anything other than StringValues here"); + String leftStringValue = ((StringValue)leftValue).getValue(); + String rightStringValue = ((StringValue)rightValue).getValue(); + int compare = leftStringValue.compareTo(rightStringValue); + if (compare == 0) + return RESULT_EQUALS; + return (compare < 0)?RESULT_GREATER:RESULT_LESS; + } + } \ No newline at end of file Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringComparatorAscending.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringComparatorAscending.java ------------------------------------------------------------------------------ svn:keywords = Id Modified: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringKey.java URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringKey.java?rev=1220353&r1=1220352&r2=1220353&view=diff ============================================================================== --- incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringKey.java (original) +++ incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringKey.java Sun Dec 18 08:36:52 2011 @@ -1,61 +1,61 @@ -/* $Id: StringKey.java 1206460 2011-11-26 15:27:37Z kwright $ */ - -/** -* Licensed to the Apache Software Foundation (ASF) under one or more -* contributor license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright ownership. -* The ASF licenses this file to You 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 org.apache.warthog.common; - -import org.apache.warthog.api.*; -import org.apache.warthog.transactionalkeyvaluestore.*; - -/** This object represents a string that can be used as a key in the key/value store. -*/ -public class StringKey extends StringValue implements WHKey -{ - protected long hashCodeValue; - - public StringKey(String value) - { - super(value); - hashCodeValue = calculateHashCode(value); - } - - public StringKey(byte[] bytes) - { - super(bytes); - hashCodeValue = calculateHashCode(value); - } - - /** Calculate the hash function. */ - public long getHashCode() - { - return hashCodeValue; - } - - public static long calculateHashCode(String value) - { - // Should be independent of JVM, which is why I do this myself - long rval = 0L; - for (int i = 0 ; i < value.length() ; i++) - { - long x = (long)value.charAt(i); - rval += (x << 5) ^ (x >> 3); - } - return rval; - } - +/* $Id$ */ + +/** +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You 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 org.apache.warthog.common; + +import org.apache.warthog.api.*; +import org.apache.warthog.transactionalkeyvaluestore.*; + +/** This object represents a string that can be used as a key in the key/value store. +*/ +public class StringKey extends StringValue implements WHKey +{ + protected long hashCodeValue; + + public StringKey(String value) + { + super(value); + hashCodeValue = calculateHashCode(value); + } + + public StringKey(byte[] bytes) + { + super(bytes); + hashCodeValue = calculateHashCode(value); + } + + /** Calculate the hash function. */ + public long getHashCode() + { + return hashCodeValue; + } + + public static long calculateHashCode(String value) + { + // Should be independent of JVM, which is why I do this myself + long rval = 0L; + for (int i = 0 ; i < value.length() ; i++) + { + long x = (long)value.charAt(i); + rval += (x << 5) ^ (x >> 3); + } + return rval; + } + } \ No newline at end of file Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringKey.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringKey.java ------------------------------------------------------------------------------ svn:keywords = Id Modified: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringValue.java URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringValue.java?rev=1220353&r1=1220352&r2=1220353&view=diff ============================================================================== --- incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringValue.java (original) +++ incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringValue.java Sun Dec 18 08:36:52 2011 @@ -1,88 +1,88 @@ -/* $Id: WHValue.java 1199794 2011-11-09 15:28:08Z kwright $ */ - -/** -* Licensed to the Apache Software Foundation (ASF) under one or more -* contributor license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright ownership. -* The ASF licenses this file to You 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 org.apache.warthog.common; - -import org.apache.warthog.api.*; -import org.apache.warthog.transactionalkeyvaluestore.*; - -/** This object represents a string that can be stored in the key/value store. -*/ -public class StringValue implements WHValue,WHKeyValue -{ - protected String value; - - public StringValue(String value) - { - this.value = value; - } - - public StringValue(byte[] bytes) - { - value = readObject(new BufferPointer(bytes)); - } - - public String getValue() - { - return value; - } - - public byte[] serializeObject() - { - byte[] rval = new byte[sizeObject(value)]; - writeObject(new BufferPointer(rval),value); - return rval; - } - - /** Check if equals (classes must already agree) */ - public boolean isEquals(WHKeyValue value) - { - StringValue thisValue = (StringValue)value; - return thisValue.value.equals(this.value); - } - - public int hashCode() - { - return value.hashCode(); - } - - public boolean equals(Object o) - { - if (this.getClass() != o.getClass()) - return false; - return ((StringValue)o).value.equals(value); - } - - public static String readObject(BufferPointer bp) - { - char[] array = CharacterArray.readObject(bp); - return new String(array); - } - - public static int sizeObject(String value) - { - return CharacterArray.sizeObject(value.length()); - } - - public static void writeObject(BufferPointer bp, String value) - { - CharacterArray.writeObject(bp,value.toCharArray()); - } - +/* $Id$ */ + +/** +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You 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 org.apache.warthog.common; + +import org.apache.warthog.api.*; +import org.apache.warthog.transactionalkeyvaluestore.*; + +/** This object represents a string that can be stored in the key/value store. +*/ +public class StringValue implements WHValue,WHKeyValue +{ + protected String value; + + public StringValue(String value) + { + this.value = value; + } + + public StringValue(byte[] bytes) + { + value = readObject(new BufferPointer(bytes)); + } + + public String getValue() + { + return value; + } + + public byte[] serializeObject() + { + byte[] rval = new byte[sizeObject(value)]; + writeObject(new BufferPointer(rval),value); + return rval; + } + + /** Check if equals (classes must already agree) */ + public boolean isEquals(WHKeyValue value) + { + StringValue thisValue = (StringValue)value; + return thisValue.value.equals(this.value); + } + + public int hashCode() + { + return value.hashCode(); + } + + public boolean equals(Object o) + { + if (this.getClass() != o.getClass()) + return false; + return ((StringValue)o).value.equals(value); + } + + public static String readObject(BufferPointer bp) + { + char[] array = CharacterArray.readObject(bp); + return new String(array); + } + + public static int sizeObject(String value) + { + return CharacterArray.sizeObject(value.length()); + } + + public static void writeObject(BufferPointer bp, String value) + { + CharacterArray.writeObject(bp,value.toCharArray()); + } + } \ No newline at end of file Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringValue.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/common/StringValue.java ------------------------------------------------------------------------------ svn:keywords = Id Modified: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHAtomicKeyValueStore.java URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHAtomicKeyValueStore.java?rev=1220353&r1=1220352&r2=1220353&view=diff ============================================================================== --- incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHAtomicKeyValueStore.java (original) +++ incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHAtomicKeyValueStore.java Sun Dec 18 08:36:52 2011 @@ -1,52 +1,52 @@ -/* $Id: WHAtomicKeyValueStore.java -1 $ */ - -/** -* Licensed to the Apache Software Foundation (ASF) under one or more -* contributor license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright ownership. -* The ASF licenses this file to You 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 org.apache.warthog.keyvalue; - -import org.apache.warthog.api.*; -import org.apache.warthog.transactionalkeyvaluestore.*; -import java.util.*; - -/** Describes the general functionality requirements of an underlying (distributed?) -* key value store, which use conflict detection as its mechanism for handling transactional -* integrity. -*/ -public interface WHAtomicKeyValueStore -{ - /** Get a value */ - public WHKeyValue get(WHKey key) - throws WHException; - - /** Check a bunch of values atomically for consistency. - *@param checkValues is a map of keys/values that must be unchanged. If any value is - * changed, a WHDeadlockException is thrown. - */ - public void check(WHKeyMap checkValues) - throws WHException; - - /** Set a bunch of values atomically. - *@param checkValues is a map of keys/values that must be unchanged in order for the - * commit to proceed. If these values are detected to have been changed, a WHDeadlockException - * will be thrown. Null values are permitted. - *@param setValues is a map of keys to set to specified new values. A null value implies removal of - * the key. - */ - public void setAll(WHKeyMap checkValues, WHKeyMap setValues) - throws WHException; -} +/* $Id$ */ + +/** +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You 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 org.apache.warthog.keyvalue; + +import org.apache.warthog.api.*; +import org.apache.warthog.transactionalkeyvaluestore.*; +import java.util.*; + +/** Describes the general functionality requirements of an underlying (distributed?) +* key value store, which use conflict detection as its mechanism for handling transactional +* integrity. +*/ +public interface WHAtomicKeyValueStore +{ + /** Get a value */ + public WHKeyValue get(WHKey key) + throws WHException; + + /** Check a bunch of values atomically for consistency. + *@param checkValues is a map of keys/values that must be unchanged. If any value is + * changed, a WHDeadlockException is thrown. + */ + public void check(WHKeyMap checkValues) + throws WHException; + + /** Set a bunch of values atomically. + *@param checkValues is a map of keys/values that must be unchanged in order for the + * commit to proceed. If these values are detected to have been changed, a WHDeadlockException + * will be thrown. Null values are permitted. + *@param setValues is a map of keys to set to specified new values. A null value implies removal of + * the key. + */ + public void setAll(WHKeyMap checkValues, WHKeyMap setValues) + throws WHException; +} Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHAtomicKeyValueStore.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHAtomicKeyValueStore.java ------------------------------------------------------------------------------ svn:keywords = Id Modified: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHKeyIterator.java URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHKeyIterator.java?rev=1220353&r1=1220352&r2=1220353&view=diff ============================================================================== --- incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHKeyIterator.java (original) +++ incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHKeyIterator.java Sun Dec 18 08:36:52 2011 @@ -1,38 +1,38 @@ -/* $Id: WHKeyIterator.java -1 $ */ - -/** -* Licensed to the Apache Software Foundation (ASF) under one or more -* contributor license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright ownership. -* The ASF licenses this file to You 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 org.apache.warthog.keyvalue; - -import org.apache.warthog.api.*; -import org.apache.warthog.transactionalkeyvaluestore.*; - -/** This interface describes an iterator over a set of WHKeys. WHException -* is possible on every iterator step. -*/ -public interface WHKeyIterator -{ - /** Check if there is another value */ - public boolean hasNext() - throws WHException; - - /** Get the next value */ - public WHKey next() - throws WHException; -} - +/* $Id$ */ + +/** +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You 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 org.apache.warthog.keyvalue; + +import org.apache.warthog.api.*; +import org.apache.warthog.transactionalkeyvaluestore.*; + +/** This interface describes an iterator over a set of WHKeys. WHException +* is possible on every iterator step. +*/ +public interface WHKeyIterator +{ + /** Check if there is another value */ + public boolean hasNext() + throws WHException; + + /** Get the next value */ + public WHKey next() + throws WHException; +} + Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHKeyIterator.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHKeyIterator.java ------------------------------------------------------------------------------ svn:keywords = Id Modified: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHKeyMap.java URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHKeyMap.java?rev=1220353&r1=1220352&r2=1220353&view=diff ============================================================================== --- incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHKeyMap.java (original) +++ incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHKeyMap.java Sun Dec 18 08:36:52 2011 @@ -1,45 +1,45 @@ -/* $Id: WHKeyMap.java -1 $ */ - -/** -* Licensed to the Apache Software Foundation (ASF) under one or more -* contributor license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright ownership. -* The ASF licenses this file to You 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 org.apache.warthog.keyvalue; - -import org.apache.warthog.api.*; -import org.apache.warthog.transactionalkeyvaluestore.*; -import java.util.*; - -/** This interface describes a set of key/value pairs that is maintained locally. -*/ -public interface WHKeyMap -{ - /** Get a value from the map. - */ - public WHKeyValue get(WHKey key) - throws WHException; - - /** Iterate over the keys in the map. - */ - public WHKeyIterator iterator() - throws WHException; - - /** Get the size of the map. - */ - public long size() - throws WHException; -} - +/* $Id$ */ + +/** +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You 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 org.apache.warthog.keyvalue; + +import org.apache.warthog.api.*; +import org.apache.warthog.transactionalkeyvaluestore.*; +import java.util.*; + +/** This interface describes a set of key/value pairs that is maintained locally. +*/ +public interface WHKeyMap +{ + /** Get a value from the map. + */ + public WHKeyValue get(WHKey key) + throws WHException; + + /** Iterate over the keys in the map. + */ + public WHKeyIterator iterator() + throws WHException; + + /** Get the size of the map. + */ + public long size() + throws WHException; +} + Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHKeyMap.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvalue/WHKeyMap.java ------------------------------------------------------------------------------ svn:keywords = Id Modified: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvaluetablestore/GeneralIDFactoryKey.java URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvaluetablestore/GeneralIDFactoryKey.java?rev=1220353&r1=1220352&r2=1220353&view=diff ============================================================================== --- incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvaluetablestore/GeneralIDFactoryKey.java (original) +++ incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvaluetablestore/GeneralIDFactoryKey.java Sun Dec 18 08:36:52 2011 @@ -1,64 +1,64 @@ -/* $Id: GeneralIDFactoryKey.java 1208116 2011-11-29 22:36:26Z kwright $ */ - -/** -* Licensed to the Apache Software Foundation (ASF) under one or more -* contributor license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright ownership. -* The ASF licenses this file to You 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 org.apache.warthog.keyvaluetablestore; - -import org.apache.warthog.api.*; -import org.apache.warthog.transactionalkeyvaluestore.*; -import org.apache.warthog.common.*; - -/** Key for accessing the general ID factory */ -public class GeneralIDFactoryKey implements WHKey -{ - /** Constructor */ - public GeneralIDFactoryKey() - { - } - - public GeneralIDFactoryKey(byte[] data) - { - } - - public byte[] serializeObject() - { - return new byte[0]; - } - - /** Calculate the hash function. */ - public long getHashCode() - { - return 15335L; - } - - public boolean isEquals(WHKeyValue value) - { - return true; - } - - public int hashCode() - { - return 15335; - } - - public boolean equals(Object o) - { - return o.getClass() == getClass(); - } - -} +/* $Id$ */ + +/** +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You 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 org.apache.warthog.keyvaluetablestore; + +import org.apache.warthog.api.*; +import org.apache.warthog.transactionalkeyvaluestore.*; +import org.apache.warthog.common.*; + +/** Key for accessing the general ID factory */ +public class GeneralIDFactoryKey implements WHKey +{ + /** Constructor */ + public GeneralIDFactoryKey() + { + } + + public GeneralIDFactoryKey(byte[] data) + { + } + + public byte[] serializeObject() + { + return new byte[0]; + } + + /** Calculate the hash function. */ + public long getHashCode() + { + return 15335L; + } + + public boolean isEquals(WHKeyValue value) + { + return true; + } + + public int hashCode() + { + return 15335; + } + + public boolean equals(Object o) + { + return o.getClass() == getClass(); + } + +} Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvaluetablestore/GeneralIDFactoryKey.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/lcf/branches/CONNECTORS-286/warthog-reimport/src/main/java/org/apache/warthog/keyvaluetablestore/GeneralIDFactoryKey.java ------------------------------------------------------------------------------ svn:keywords = Id