Class POCopyCache<K,​V extends PO>

    • Constructor Detail

      • POCopyCache

        public POCopyCache​(String name,
                           int initialCapacity,
                           int expireMinutes,
                           boolean distributed,
                           int maxSize)
        Parameters:
        name -
        initialCapacity -
        expireMinutes -
        distributed -
        maxSize -
      • POCopyCache

        public POCopyCache​(String name,
                           int initialCapacity,
                           int expireMinutes,
                           boolean distributed)
        Parameters:
        name -
        initialCapacity -
        expireMinutes -
        distributed -
      • POCopyCache

        public POCopyCache​(String name,
                           int initialCapacity,
                           int expireMinutes)
        Parameters:
        name -
        initialCapacity -
        expireMinutes -
      • POCopyCache

        public POCopyCache​(String name,
                           int initialCapacity)
        Parameters:
        name -
        initialCapacity -
      • POCopyCache

        public POCopyCache​(String tableName,
                           String name,
                           int initialCapacity,
                           boolean distributed)
        Parameters:
        tableName -
        name -
        initialCapacity -
        distributed -
      • POCopyCache

        public POCopyCache​(String tableName,
                           String name,
                           int initialCapacity,
                           int expireMinutes,
                           boolean distributed,
                           int maxSize)
        Parameters:
        tableName -
        name -
        initialCapacity -
        expireMinutes -
        distributed -
        maxSize -
      • POCopyCache

        public POCopyCache​(String tableName,
                           String name,
                           int initialCapacity,
                           int expireMinutes,
                           boolean distributed)
        Parameters:
        tableName -
        name -
        initialCapacity -
        expireMinutes -
        distributed -
      • POCopyCache

        public POCopyCache​(String tableName,
                           String name,
                           int initialCapacity)
        Parameters:
        tableName -
        name -
        initialCapacity -
    • Method Detail

      • put

        public V put​(K key,
                     V value)
        Description copied from class: CCache
        Put value
        Specified by:
        put in interface Map<K,​V extends PO>
        Overrides:
        put in class CCache<K,​V extends PO>
        Parameters:
        key - key
        value - value
        Returns:
        previous value
      • put

        public V put​(K key,
                     V po,
                     UnaryOperator<V> copyOperator)
        A copy of the PO will be created and add to cache using copyOperator or through copy constructor (through reflection) if copyOperator parameter is null (exception is throw if both copyOperator and copy constructor is not available).
        Parameters:
        key -
        po -
        copyOperator - operator to call copy constructor
        Returns:
        PO added to cache
      • get

        public V get​(Properties ctx,
                     K key)
        Parameters:
        ctx - context
        key -
        Returns:
        value for key
      • get

        public V get​(Properties ctx,
                     K key,
                     String trxName)
        Parameters:
        ctx - context
        key -
        trxName -
        Returns:
        value for key
      • get

        public V get​(K key,
                     UnaryOperator<V> copyOperator)
        Get PO from cache. A copy of the cached PO is return
        Parameters:
        key -
        copyOperator - operator to call copy constructor
        Returns:
        PO from cache (if there's match for key)