Package com.apple.foundationdb.record.provider.foundationdb.layers.interning

A layer for mapping potentially long strings to and from more compact tuple elements.

A string identifier that is part of a KeySpace will be part of the key for every record and every index entry is a record store following that key space. Since FoundationDB does not do prefix compression, this can add up to a lot of space when the string is long enough to really express anything. Space is saved by replacing the string in the key Tuple with an integer gotten by interning it.

This interning operation is very similar to what the DirectoryLayer does, except that whereas the directory layer actually identifies space between the root of the key-value store, an interned path element might be anywhere in the path.