Packages

c

org.latestbit.slack.morphism.client.streaming

SlackApiResponseScroller

class SlackApiResponseScroller[F[_], IT, PT, SR <: SlackApiScrollableResponse[IT, PT]] extends LazyScalaCollectionSupport[F, IT, PT, SR]

Support for batch loading remote data

IT

batch item type

PT

batch value type

Linear Supertypes
LazyScalaCollectionSupport[F, IT, PT, SR], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SlackApiResponseScroller
  2. LazyScalaCollectionSupport
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SlackApiResponseScroller(initialLoader: () ⇒ F[Either[SlackApiClientError, SR]], batchLoader: (PT) ⇒ F[Either[SlackApiClientError, SR]])(implicit arg0: BackendType[F])

    initialLoader

    a function to initial request for data

    batchLoader

    a function to load next batch based on previous state

Type Members

  1. type AsyncItemType = Either[SlackApiClientError, SR]
  2. type AsyncValueType = Either[SlackApiClientError, Iterable[IT]]
  3. type SyncStreamType = Stream[IT]
    Definition Classes
    LazyScalaCollectionSupport

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def first(): F[Either[SlackApiClientError, SR]]

    Read the initial data

    Read the initial data

    returns

    a scrollable response with a cursor position

    Note

    this functions is mostly available to help to implement your own batching. If it wasn't your intention look at toAsync/SyncScroller or toPublisher

  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def next(lastPosition: PT): F[Either[SlackApiClientError, SR]]

    Read a next batch providing a last position

    Read a next batch providing a last position

    lastPosition

    a cursor position

    Note

    this functions is mostly available to help to implement your own batching. If it wasn't your intention look at toAsync/SyncScroller or toPublisher

  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  18. def toAsyncScroller(): AsyncSeqIterator[F, AsyncItemType, AsyncValueType]

    Read data as an infinite async iterator of batches

    Read data as an infinite async iterator of batches

    returns

    infinite async sequence iterator

  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. def toSyncScroller(scrollerTimeout: FiniteDuration = 60.seconds)(implicit syncScrollerAwaiter: SyncScrollerAwaiter[F], monad: Monad[F]): F[Either[SlackApiClientError, SyncStreamType]]

    Lazy load data synchronously batching using standard lazy container

    Lazy load data synchronously batching using standard lazy container

    scrollerTimeout

    timeout to receive next batch

    returns

    lazy stream of data

    Definition Classes
    LazyScalaCollectionSupport
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from LazyScalaCollectionSupport[F, IT, PT, SR]

Inherited from AnyRef

Inherited from Any

Ungrouped