Class IOResult

  • All Implemented Interfaces:
    java.io.Serializable, scala.Equals, scala.Product

    public final class IOResult
    extends java.lang.Object
    implements scala.Product, java.io.Serializable
    Holds a result of an IO operation.

    param: count Numeric value depending on context, for example IO operations performed or bytes processed. param: status Status of the result. Can be either pekko.Done or an exception.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      IOResult​(long count, scala.util.Try<Done> status)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static IOResult apply​(long count)  
      static IOResult apply​(long count, scala.util.Try<Done> status)  
      boolean canEqual​(java.lang.Object x$1)  
      IOResult copy​(long count, scala.util.Try<Done> status)  
      long copy$default$1()  
      scala.util.Try<Done> copy$default$2()  
      long count()  
      static IOResult createFailed​(long count, java.lang.Throwable ex)
      JAVA API: Creates failed IOResult, `count` should be the number of bytes (or other unit, please document in your APIs) processed before failing
      static IOResult createSuccessful​(long count)
      JAVA API: Creates successful IOResult
      boolean equals​(java.lang.Object x$1)  
      long getCount()
      Java API: Numeric value depending on context, for example IO operations performed or bytes processed.
      java.lang.Throwable getError()
      Java API: If the IO operation resulted in an error, returns the corresponding Throwable or throws UnsupportedOperationException otherwise.
      int hashCode()  
      int productArity()  
      java.lang.Object productElement​(int x$1)  
      java.lang.String productElementName​(int x$1)  
      scala.collection.Iterator<java.lang.Object> productIterator()  
      java.lang.String productPrefix()  
      scala.util.Try<Done> status()  
      java.lang.String toString()  
      static scala.Option<scala.Tuple2<java.lang.Object,​scala.util.Try<Done>>> unapply​(IOResult x$0)  
      boolean wasSuccessful()
      Java API: Indicates whether IO operation completed successfully or not.
      IOResult withCount​(long value)
      Creates a new IOResult with the given count and the same status.
      IOResult withStatus​(scala.util.Try<Done> value)
      Creates a new IOResult with the given status and the same count.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface scala.Product

        productElementNames
    • Constructor Detail

      • IOResult

        public IOResult​(long count,
                        scala.util.Try<Done> status)
    • Method Detail

      • apply

        public static IOResult apply​(long count)
      • createSuccessful

        public static IOResult createSuccessful​(long count)
        JAVA API: Creates successful IOResult
      • createFailed

        public static IOResult createFailed​(long count,
                                            java.lang.Throwable ex)
        JAVA API: Creates failed IOResult, `count` should be the number of bytes (or other unit, please document in your APIs) processed before failing
      • apply

        public static IOResult apply​(long count,
                                     scala.util.Try<Done> status)
      • unapply

        public static scala.Option<scala.Tuple2<java.lang.Object,​scala.util.Try<Done>>> unapply​(IOResult x$0)
      • count

        public long count()
      • status

        public scala.util.Try<Done> status()
      • withCount

        public IOResult withCount​(long value)
        Creates a new IOResult with the given count and the same status.
      • withStatus

        public IOResult withStatus​(scala.util.Try<Done> value)
        Creates a new IOResult with the given status and the same count.
      • getCount

        public long getCount()
        Java API: Numeric value depending on context, for example IO operations performed or bytes processed.
      • wasSuccessful

        public boolean wasSuccessful()
        Java API: Indicates whether IO operation completed successfully or not.
      • getError

        public java.lang.Throwable getError()
        Java API: If the IO operation resulted in an error, returns the corresponding Throwable or throws UnsupportedOperationException otherwise.
      • copy

        public IOResult copy​(long count,
                             scala.util.Try<Done> status)
      • copy$default$1

        public long copy$default$1()
      • copy$default$2

        public scala.util.Try<Done> copy$default$2()
      • productPrefix

        public java.lang.String productPrefix()
        Specified by:
        productPrefix in interface scala.Product
      • productArity

        public int productArity()
        Specified by:
        productArity in interface scala.Product
      • productElement

        public java.lang.Object productElement​(int x$1)
        Specified by:
        productElement in interface scala.Product
      • productIterator

        public scala.collection.Iterator<java.lang.Object> productIterator()
        Specified by:
        productIterator in interface scala.Product
      • canEqual

        public boolean canEqual​(java.lang.Object x$1)
        Specified by:
        canEqual in interface scala.Equals
      • productElementName

        public java.lang.String productElementName​(int x$1)
        Specified by:
        productElementName in interface scala.Product
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object x$1)
        Specified by:
        equals in interface scala.Equals
        Overrides:
        equals in class java.lang.Object