Package org.apache.ignite.index
Interface IntLongIndexRow
-
- All Superinterfaces:
Comparable<IntLongIndexRow>
public interface IntLongIndexRow extends Comparable<IntLongIndexRow>
Integer key and 31-bit value row.Each index row may be either a normal row, or a tombstone. Tombstones are used to explicitly mark removed rows if ordinary removal is not suitable.
Rows are compared by key and value. A normal row and a tombstone row with equal keys and values are considered equal.
-
-
Field Summary
Fields Modifier and Type Field Description static long
VALUE_MASK
Mask of bits which may be occupied by value.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static IntLongIndexRow
createRow(int key, long value)
Creates a new normal row.static IntLongIndexRow
createTombstone(int key, long value)
Creates a new tombstone row.int
getKey()
Gets row key.long
getValue()
Gets row value.boolean
isTombstone()
static IntLongIndexRow
lowerBound(int key)
Creates a new lower bound row for the provided key.static IntLongIndexRow
lowerBound(int key, long value)
Creates a new lower bound row for the provided key.static IntLongIndexRow
upperBound(int key)
Creates a new upper bound row for the provided key.static IntLongIndexRow
upperBound(int key, long value)
Creates a new upper bound row for the provided key.-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Field Detail
-
VALUE_MASK
static final long VALUE_MASK
Mask of bits which may be occupied by value.- See Also:
- Constant Field Values
-
-
Method Detail
-
getKey
int getKey()
Gets row key.- Returns:
- The row key.
-
getValue
long getValue()
Gets row value.- Returns:
- The row value, always non-negative.
-
isTombstone
boolean isTombstone()
- Returns:
- Whether this row is a tombstone.
-
lowerBound
static IntLongIndexRow lowerBound(int key)
Creates a new lower bound row for the provided key. The lower bound row is the minimal row among all rows with the same key.- Parameters:
key
- The row key.- Returns:
- The lower bound row for the provided key, never
null
.
-
lowerBound
static IntLongIndexRow lowerBound(int key, long value)
Creates a new lower bound row for the provided key. The lower bound row is the minimal row among all rows with the same key.- Parameters:
key
- The row key.value
- The row value.- Returns:
- The lower bound row for the provided key, never
null
.
-
upperBound
static IntLongIndexRow upperBound(int key)
Creates a new upper bound row for the provided key. The upper bound row is the maximal row among all rows with the same key.- Parameters:
key
- The row key.- Returns:
- The upper bound row for the provided key, never
null
.
-
upperBound
static IntLongIndexRow upperBound(int key, long value)
Creates a new upper bound row for the provided key. The upper bound row is the maximal row among all rows with the same key.- Parameters:
key
- The row key.value
- The row value.- Returns:
- The upper bound row for the provided key, never
null
.
-
createRow
static IntLongIndexRow createRow(int key, long value)
Creates a new normal row.- Parameters:
key
- The row key.value
- The row value. Must occupy 31 lower bits, i.e. it must be non-negative.- Returns:
- The new row, never
null
.
-
createTombstone
static IntLongIndexRow createTombstone(int key, long value)
Creates a new tombstone row.- Parameters:
key
- The row key.value
- The row value. Must occupy 31 lower bits, i.e. it must be non-negative.- Returns:
- The new row, never
null
.
-
-