Interface Offloadable

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface Offloadable
    Allows off-loading the processing unit implementing this interface to the specified or default Executor. Currently supported in:
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String NO_OFFLOADING
      Constant meaning that there will be no off-loading if returned from the getExecutorName() method.
      static java.lang.String OFFLOADABLE_EXECUTOR
      Constant meaning that processing will be off-loaded to the default OFFLOADABLE_EXECUTOR executor.
    • Field Detail

      • NO_OFFLOADING

        static final java.lang.String NO_OFFLOADING
        Constant meaning that there will be no off-loading if returned from the getExecutorName() method.
        See Also:
        Constant Field Values
      • OFFLOADABLE_EXECUTOR

        static final java.lang.String OFFLOADABLE_EXECUTOR
        Constant meaning that processing will be off-loaded to the default OFFLOADABLE_EXECUTOR executor. if returned from the getExecutorName() method.
        See Also:
        ExecutionService.OFFLOADABLE_EXECUTOR, Constant Field Values
    • Method Detail

      • getExecutorName

        java.lang.String getExecutorName()
        Returns the name of the executor to which the processing unit will be off-loaded. The return value equal to "hz:offloadable" indicates that the processing should off-loaded to the default ExecutionService.OFFLOADABLE_EXECUTOR. The return value equal to "no-offloading" indicates that the processing should not be off-loaded at all. The processing will be executed as if the processing-unit didn't implement the Offloadable interface. Other return values will lookup the executor with the returned value which can be configured in the Hazelcast configuration.
        Returns:
        the name of the executor to which the processing should be off-loaded.
        See Also:
        ExecutorConfig, Config.addExecutorConfig(ExecutorConfig)