public class BookmarkField extends StringField implements java.lang.Cloneable
Message consisting of the bookmark.
This is the AMPS Bookmark for the Message.| Modifier and Type | Field and Description |
|---|---|
protected java.util.zip.CRC32 |
c |
static int |
MAX_BOOKMARK_LENGTH |
static int |
MAX_TIMESTAMP_LENGTH |
static int |
MIN_TIMESTAMP_LENGTH |
static char |
SEPARATOR_CHAR
The character used to separate components of a bookmark, and to
separate bookmarks from each other in a list.
|
LATIN1, LATIN1_ZERO| Modifier | Constructor and Description |
|---|---|
|
BookmarkField()
Default constructor.
|
protected |
BookmarkField(byte[] buffer,
int position,
int length)
Constructor with specified buffer, position, and length.
|
| Modifier and Type | Method and Description |
|---|---|
BookmarkField |
clone()
Provides a way to duplicate this object and retain its specific type (and hashcode() implementation).
|
BookmarkField |
copy()
Override base class's copy() method appropriately, so we don't inadvertently mix
BookmarkFields and Fields up -- they have different hashCode implementations.
|
boolean |
equals(java.lang.Object object_)
Checks if the bookmark field is equal to another object.
|
protected int |
getConversionBufInitialSize()
Overrides the base classes' initial default size for the byte and
char conversion buffers used by this instance.
|
long |
getPublisherId()
Gets the publisher id for this bookmark.
|
long |
getSequenceNumber()
Gets the sequence number for this bookmark.
|
int |
hashCode()
Calculates the hash code for the bookmark field.
|
boolean |
isBookmarkList() |
boolean |
isRange()
Indicates whether this bookmark value appears to be a range,
using only a simple check for brackets or parentheses.
|
boolean |
isTimestamp()
Indicates whether this bookmark value appears to be a timestamp.
|
java.util.ArrayList<BookmarkField> |
parseBookmarkList()
Parses the bookmark list.
|
static boolean |
unsignedLongLess(long seqLeft_,
long seqRight_)
Compare two signed long values as unsigned long values;
the publisherId_ and sequence are signed in java, but the actual values
are unsigned, so we have to do some work to compare them.
|
static boolean |
unsignedLongLessEqual(long seqLeft_,
long seqRight_)
Compare two signed long values as unsigned long values;
the publisherId_ and sequence are signed in java, but the actual values
are unsigned, so we have to do some work to compare them.
|
getValue, getValue, getValue, setValue, setValue, setValuepublic static final char SEPARATOR_CHAR
public static final int MAX_BOOKMARK_LENGTH
public static final int MAX_TIMESTAMP_LENGTH
public static final int MIN_TIMESTAMP_LENGTH
protected final java.util.zip.CRC32 c
protected BookmarkField(byte[] buffer,
int position,
int length)
buffer - The byte array containing the bookmark field.position - The starting position of the bookmark field
in the buffer.length - The length of the bookmark field.public BookmarkField()
protected int getConversionBufInitialSize()
getConversionBufInitialSize in class StringFieldpublic boolean isTimestamp()
public boolean isRange()
public long getPublisherId()
public long getSequenceNumber()
public static boolean unsignedLongLess(long seqLeft_,
long seqRight_)
seqLeft_ - The value being compared.seqRight_ - The value to compare to.public static boolean unsignedLongLessEqual(long seqLeft_,
long seqRight_)
seqLeft_ - The value being compared.seqRight_ - The value to compare to.public boolean isBookmarkList()
public java.util.ArrayList<BookmarkField> parseBookmarkList()
BookmarkFieldpublic int hashCode()
public BookmarkField clone()
clone in class java.lang.Objectpublic BookmarkField copy()