Class DataDictionaryCompro

java.lang.Object
org.lsst.ccs.services.DataDictionaryCompro
All Implemented Interfaces:
Serializable, DataProviderDictionary

public final class DataDictionaryCompro extends Object implements DataProviderDictionary
DataProviderDictionary implementation that minimizes memory footprint and serialized size at the expense of access speed. Instances of this class are immutable. Order of DataProviderInfo instances is partially preserved.

Implementation notes

Currently, extra complexity is added by the fact that we associate key as well as path with every data channel. This is left over from supporting both full and short paths, and is expected to be removed in later versions. For now, int keyFlag is associated with every tree node to tell how to extract path and key from the full path:
  • keyFlag = NO_PATH : not a terminal node
  • keyFlag = NULL_PATH : path = null, key = fullPath
  • keyFlag = EMPTY_PATH : path = "", key = fullPath
  • keyFlag less than 0 : abs(keyFlag) is the number of segments in key, fullPath = path + key
  • others : keyFlag is the number of segments in key, fullPath ends with key
Author:
onoprien
See Also: