Class AbstractIndexManager

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Channel channel  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected <K extends Data,​T>
      boolean
      addIndexWithSet​(java.util.Map<K,​java.util.Set<T>> index, K key, java.util.Collection<T> values)
      Associates each item of the given collection of value to the given key in the given index.
      protected <K extends Data,​T>
      boolean
      addIndexWithSet​(java.util.Map<K,​java.util.Set<T>> index, K key, T value)
      Associates the given value to the given key in the given index.
      protected <K extends Data,​V>
      void
      clearIndex​(java.util.Map<K,​V> index, K key)
      Remove the map at the given key in the given index.
      protected <K extends Data,​X,​Y>
      java.util.Map<X,​Y>
      getIndexWithMap​(java.util.Map<K,​java.util.Map<X,​Y>> index, K key)
      Returns the map associated to the given key in the given index.
      protected <K extends Data,​X,​Y>
      Y
      getIndexWithMap​(java.util.Map<K,​java.util.Map<X,​Y>> index, K key, X name)
      Returns the value associated to the given name for the given key in the given index.
      protected <K extends Data,​T>
      java.util.Set<T>
      getIndexWithSet​(java.util.Map<K,​java.util.Set<T>> index, K key)
      Returns the set associated to the given key in the given index.
      protected <T extends Data>
      T
      getOriginalData​(T data)
      Retrieve the orignal Data from the given one (typically if the given data is a clone of an original data)
      protected <K extends Data,​T>
      boolean
      isUndefinedIndexWithSet​(java.util.Map<K,​java.util.Set<T>> index, K key)
      Returns true is key is null or if no index (even empty) is stored in the given index.
      protected <K extends Data,​X,​Y>
      void
      putIndexWithMap​(java.util.Map<K,​java.util.Map<X,​Y>> index, K key, X name, Y value)
      Associates the given value to the given name at the given key in the given index.
      protected <K extends Data,​X,​Y>
      Y
      removeIndexWithMap​(java.util.Map<K,​java.util.Map<X,​Y>> index, K key, X name)
      Remove the given name at the given key in the given index.
      protected <K extends Data,​T>
      boolean
      removeIndexWithSet​(java.util.Map<K,​java.util.Set<T>> index, K key, java.util.Collection<T> values)
      Removes the given values for the given key in the given index.
      protected <K extends Data,​T>
      boolean
      removeIndexWithSet​(java.util.Map<K,​java.util.Set<T>> index, K key, T value)
      Removes the given value for the given key in the given index.
      protected <K extends Data,​T>
      void
      setIndexWithSet​(java.util.Map<K,​java.util.Set<T>> index, K key, java.util.Set<T> set)
      Associates the given set to the given key in the given index.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • channel

        protected Channel channel
    • Constructor Detail

      • AbstractIndexManager

        public AbstractIndexManager()
    • Method Detail

      • getOriginalData

        protected <T extends Data> T getOriginalData​(T data)
        Retrieve the orignal Data from the given one (typically if the given data is a clone of an original data)
        Parameters:
        data - the data (may be a clone of the original)
        Returns:
        the original data.
        Since:
        jcms-6.0.0
      • getIndexWithSet

        protected <K extends Data,​T> java.util.Set<T> getIndexWithSet​(java.util.Map<K,​java.util.Set<T>> index,
                                                                            K key)
        Returns the set associated to the given key in the given index.
        Parameters:
        index - the index
        key - the key
        Returns:
        the set associated to the given key in the given index.
        Since:
        jcms-6.0.0
      • isUndefinedIndexWithSet

        protected <K extends Data,​T> boolean isUndefinedIndexWithSet​(java.util.Map<K,​java.util.Set<T>> index,
                                                                           K key)
        Returns true is key is null or if no index (even empty) is stored in the given index.
        Parameters:
        index - the index
        key - the key
        Returns:
        true if no index is associated to this key (or key is null).
        Since:
        jcms-6.1.0
      • setIndexWithSet

        protected <K extends Data,​T> void setIndexWithSet​(java.util.Map<K,​java.util.Set<T>> index,
                                                                K key,
                                                                java.util.Set<T> set)
        Associates the given set to the given key in the given index.
        Parameters:
        index - the index
        key - the key
        set - the set
        Since:
        jcms-6.0.0
      • addIndexWithSet

        protected <K extends Data,​T> boolean addIndexWithSet​(java.util.Map<K,​java.util.Set<T>> index,
                                                                   K key,
                                                                   T value)
        Associates the given value to the given key in the given index.
        Parameters:
        index - the index
        key - the key
        value - the value
        Returns:
        true if this set did not already contain the specified value.
        Since:
        jcms-6.0.0
      • addIndexWithSet

        protected <K extends Data,​T> boolean addIndexWithSet​(java.util.Map<K,​java.util.Set<T>> index,
                                                                   K key,
                                                                   java.util.Collection<T> values)
        Associates each item of the given collection of value to the given key in the given index.
        Parameters:
        index - the index
        key - the key
        values - the values
        Returns:
        true if this set changed as a result of the call
        Since:
        jcms-9.0.5 JCMS-5821
      • removeIndexWithSet

        protected <K extends Data,​T> boolean removeIndexWithSet​(java.util.Map<K,​java.util.Set<T>> index,
                                                                      K key,
                                                                      T value)
        Removes the given value for the given key in the given index.
        Parameters:
        index - the index
        key - the key
        value - the value
        Returns:
        true if this set did not already contain the specified value.
        Since:
        jcms-6.0.0
      • removeIndexWithSet

        protected <K extends Data,​T> boolean removeIndexWithSet​(java.util.Map<K,​java.util.Set<T>> index,
                                                                      K key,
                                                                      java.util.Collection<T> values)
        Removes the given values for the given key in the given index.
        Parameters:
        index - the index
        key - the key
        values - the values to remove
        Returns:
        true if this set changed as a result of the call
        Since:
        jcms-9.0.5 JCMS-5821
      • getIndexWithMap

        protected <K extends Data,​X,​Y> java.util.Map<X,​Y> getIndexWithMap​(java.util.Map<K,​java.util.Map<X,​Y>> index,
                                                                                            K key)
        Returns the map associated to the given key in the given index.
        Parameters:
        index - the index
        key - the key
        Returns:
        the map associated to the given key in the given index.
        Since:
        jcms-6.0.0
      • getIndexWithMap

        protected <K extends Data,​X,​Y> Y getIndexWithMap​(java.util.Map<K,​java.util.Map<X,​Y>> index,
                                                                     K key,
                                                                     X name)
        Returns the value associated to the given name for the given key in the given index.
        Parameters:
        index - the index
        key - the key
        name - the name
        Returns:
        the value associated to the given name for the given key in the given index.
        Since:
        jcms-6.0.0
      • putIndexWithMap

        protected <K extends Data,​X,​Y> void putIndexWithMap​(java.util.Map<K,​java.util.Map<X,​Y>> index,
                                                                        K key,
                                                                        X name,
                                                                        Y value)
        Associates the given value to the given name at the given key in the given index.
        Parameters:
        index - the index
        key - the key
        name - the name
        value - the value
        Since:
        jcms-6.0.0
      • removeIndexWithMap

        protected <K extends Data,​X,​Y> Y removeIndexWithMap​(java.util.Map<K,​java.util.Map<X,​Y>> index,
                                                                        K key,
                                                                        X name)
        Remove the given name at the given key in the given index.
        Parameters:
        index - the index
        key - the key
        name - the name
        Returns:
        the removed value
        Since:
        jcms-6.0.0
      • clearIndex

        protected <K extends Data,​V> void clearIndex​(java.util.Map<K,​V> index,
                                                           K key)
        Remove the map at the given key in the given index.
        Parameters:
        index - the index
        key - the key
        Since:
        jcms-6.0.0