Bitmap Index

The GigaMap comes with a built-in bitmap index, an all-purpose index with implementations for the most commonly used types.

The index data is kept off-heap, so the JVM does not have to manage it, garbage collecting and so on. Additionally, the data can become arbitrarily large since this memory region can be swapped to the hard disk by the operating system.

Indexers

An indexer is a logic that extracts the key value of the entity that is stored in the index.

It is also used to create query conditions, with special methods for different key types.

Here’s a list of all predefined indexers:

Indexer Key Type

BinaryIndexer

long

IndexerString

java.lang.String

IndexerCharacter

java.lang.Character, char

IndexerBoolean

java.lang.Boolean, boolean

IndexerByte

java.lang.Byte, byte

IndexerShort

java.lang.Short, short

IndexerInteger

java.lang.Integer, int

IndexerLong

java.lang.Long, long

IndexerFloat

java.lang.Float, float

IndexerDouble

java.lang.Double, double

IndexerLocalDate

java.time.LocalDate

IndexerLocalTime

java.time.LocalTime

IndexerLocalDateTime

java.time.LocalDateTime

IndexerYearMonth

java.time.YearMonth

IndexerUUID

java.util.UUID

IndexerMultiValue

java.lang.Iterable

Besides these predefined indexers, custom indexers with arbitrary key types can be implemented.

Keep in mind that indexers use value equality by default, so when using a custom key type make sure to implement equals and hashCode.