Class AbstractKeyBundler

    • Constructor Detail

      • AbstractKeyBundler

        public AbstractKeyBundler()
    • Method Detail

      • process

        protected Object process​(Object oKey)
        Process the specified key in a most optimal way according to the bundle settings.
        Parameters:
        oKey - the key to process
        Returns:
        an execution result according to the caller's contract
      • processAll

        protected Map processAll​(Collection colKeys)
        Process a colKeys of specified items in a most optimal way according to the bundle settings.
        Parameters:
        colKeys - the collection of keys to process
        Returns:
        an execution result according to the caller's contract
      • bundle

        protected abstract Map bundle​(Collection colKeys)
        The bundle operation to be performed against a collected set of keys by the concrete AbstractKeyBundler implementations. If an exception occurs during bundle operation, it could be repeated using singleton sets.
        Parameters:
        colKeys - a key collection to perform the bundled operation for
        Returns:
        the Map of operation results
      • unbundle

        protected abstract Object unbundle​(Object oKey)
        Un-bundle bundled operation. This operation would be used if an exception occurs during a bundled operation or if the number of active threads is below the ThreadThreshold value.
        Parameters:
        oKey - a key to perform the un-bundled operation for
        Returns:
        the operation result for the specified key, may be null