Class AsciiStringInterner.Key
java.lang.Object
org.postgresql.core.AsciiStringInterner.Key
- All Implemented Interfaces:
Comparable<AsciiStringInterner.Key>
- Enclosing class:
AsciiStringInterner
private static final class AsciiStringInterner.Key
extends Object
implements Comparable<AsciiStringInterner.Key>
Key for lookups and for stored entries. A stored key owns a copy of the bytes that is never
changed. The labels come from the server, so many of them can have the same hash.
ConcurrentHashMap keeps a bin of equal hashes ordered only for a key class that
implements Comparable of its own type.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidintcompareTo(AsciiStringInterner.Key other) booleaninthashCode()
-
Field Details
-
hash
private final int hash -
bytes
final byte[] bytes -
offset
final int offset -
length
final int length
-
-
Constructor Details
-
Key
Key(int hash, byte[] bytes, int offset, int length)
-
-
Method Details
-
hashCode
-
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<AsciiStringInterner.Key>
-
appendString
-