Class KVStoreCollectionTwoLayerPartition

  • All Implemented Interfaces:
    java.lang.Iterable<java.util.Map.Entry<java.lang.String,​java.util.Map<java.lang.String,​KVStoreCollection>>>

    public class KVStoreCollectionTwoLayerPartition
    extends java.lang.Object
    implements java.lang.Iterable<java.util.Map.Entry<java.lang.String,​java.util.Map<java.lang.String,​KVStoreCollection>>>
    Automatically partitions a KVStoreCollection in a two-layered fashion according to a first and second level key when KVStores or KVStoreCollections are added.
    • Constructor Detail

      • KVStoreCollectionTwoLayerPartition

        public KVStoreCollectionTwoLayerPartition​(java.lang.String firstLayerKey,
                                                  java.lang.String secondLayerKey,
                                                  KVStoreCollection collection)
        Creates an empty two layer KVStoreCollection partition.
        Parameters:
        firstLayerKey - The field name for the first level partition.
        secondLayerKey - The field name for the second level partition.
        collection - The KVStoreCollection to initialize this two-layer partition.
      • KVStoreCollectionTwoLayerPartition

        public KVStoreCollectionTwoLayerPartition​(java.lang.String firstLevelKey,
                                                  java.lang.String secondLevelKey)
        Creates an empty two layer KVStorCollection partition.
        Parameters:
        firstLevelKey - The field name for the first level partition.
        secondLevelKey - The field name for the second level partition.
    • Method Detail

      • getData

        public java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​KVStoreCollection>> getData()
      • entrySet

        public java.util.Set<java.util.Map.Entry<java.lang.String,​java.util.Map<java.lang.String,​KVStoreCollection>>> entrySet()
        Returns:
        The set of entries of this partition.
      • iterator

        public java.util.Iterator<java.util.Map.Entry<java.lang.String,​java.util.Map<java.lang.String,​KVStoreCollection>>> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<java.util.Map.Entry<java.lang.String,​java.util.Map<java.lang.String,​KVStoreCollection>>>
      • getFirstLayerKey

        public java.lang.String getFirstLayerKey()
        Returns:
        The key name that is used to do the partition for the first layer.
      • getSecondLayerKey

        public java.lang.String getSecondLayerKey()
        Returns:
        The key name that is used to do the partition for the second layer.