Class HekateFuture<T,​F extends HekateFuture<T,​F>>

    • Constructor Detail

      • HekateFuture

        public HekateFuture()
    • Method Detail

      • newInstance

        protected abstract F newInstance()
        Constructs new future instance of this class.

        This method is used by fork() to construct a new future objects.

        Returns:
        New instance.
      • isSuccess

        public boolean isSuccess()
        Returns true if this future completed successfully without an error.
        Returns:
        true if this future completed successfully.
      • fork

        public F fork()
        Returns a new future instance who's lifecycle depends on this instance but not vice versa.

        If this instance gets completed (either normally or with an error) then forked instance will be completed too. Completing forked instance has no impact on this instance.

        Returns:
        Fork of this instance.