Packages

  • package root
    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package cisco
    Definition Classes
    com
  • package streambed

    The base package of the Streambed library.

    The base package of the Streambed library. Of note is the com.cisco.streambed.Application suite of types. These types conveniently establish a streambed environment for an application.

    Sample usage from Java:

    /**
     * Bootstraps our application and handles signals
     */
    public class MyServerEntryPoints {
        private static ApplicationProcess applicationProcess = null;
    
        public static void main(String[] args) {
            applicationProcess = new ApplicationProcess(new MyServer());
            applicationProcess.main(args);
        }
    
        public static void trap(int signal) {
          if (applicationProcess != null) {
                applicationProcess.trap(signal);
            }
        }
    }

    ...with MyServer being declared as:

    public class MyServer extends Application {
        @Override
        public void main(String[] args, ApplicationContext context) {
          ..
        }
    }

    The equivalent in Scala:

    object MyServerEntryPoints {
      private lazy val applicationProcess = ApplicationProcess(MyServer)
    
      def main(args: Array[String]): Unit =
        applicationProcess.main(args)
    
      def trap(signal: Int): Unit =
        applicationProcess.trap(signal)
    }

    ...with MyServer being declared as:

    object MyServer extends Application {
      override def main(args: Array[String], applicationContext: ApplicationContext): Unit = {
        ..
      }
    }

    The essential idea is that a regular JVM entry point (MyServerEntryPoints), establishes a com.cisco.streambed.ApplicationProcess of a class named MyServer. The trap method is used by Landlord for whenever an operating systemm signal is sent to the process. My extending com.cisco.streambed.Application, a com.cisco.streambed.ApplicationContext is provided by Streambed, containing almost all of what an application will require in order to startup (an actor system, metrics, logging...). The resources provided within the context are also automatically released on exit.

    Definition Classes
    cisco
  • package testkit

    Various utilities to support streambed based tests

    Various utilities to support streambed based tests

    Definition Classes
    streambed
  • package durablequeue

    An in-memory durable queue to facilitate tests.

    An in-memory durable queue to facilitate tests.

    Sample usage within a Java test:

    DurableQueue durableQueue = InMemoryQueue$.MODULE$.queue(mat, system);

    Sample usage within a Scala test:

    val durableQueue = InMemoryQueue.queue()
    Definition Classes
    testkit
  • DurableQueueTestSuite
  • InMemoryQueue

final class InMemoryQueue extends DurableQueue

An implementation of DurableQueue that uses an in-memory data structures. This is useful for testing and should not be used in production environments due to there being no durability.

Linear Supertypes
DurableQueue, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InMemoryQueue
  2. DurableQueue
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def commit[A](tailerId: UUID): Flow[(Committable, A), A, NotUsed]

    A flow that tracks consumed offsets, and when successfully consumed stores the offset.

    A flow that tracks consumed offsets, and when successfully consumed stores the offset. Due to the nature of distributed systems, tailers should be able to gracefully consume the same messages more than once, given that e.g. the commit operation could fail.

    tailerId

    An id for the tailer. Named (V3 or V5) UUIDs are recommended for deterministic UUID calculation.

    returns

    A flow that accepts CommittableEvent instance and a carry element and stores their offsets, emitting the carry element.

    Definition Classes
    InMemoryQueueDurableQueue
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  10. def flow[A]: Flow[CommandRequest[A], CommandReply[A], NotUsed]

    Append a command request to a queue

    Append a command request to a queue

    A

    The type of data to carry through

    returns

    a flow that takes a command and returns with an acknowledgement

    Definition Classes
    InMemoryQueueDurableQueue
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. def offset(topic: Topic, tailerId: UUID): Future[Option[Long]]

    Returns the latest offset a given tailer has committed.

    Returns the latest offset a given tailer has committed.

    tailerId

    An id for the tailer. Named (V3 or V5) UUIDs are recommended for deterministic UUID calculation.

    Definition Classes
    InMemoryQueueDurableQueue
  18. def sink[A]: Sink[CommandRequest[A], Future[Done]]

    Append a command request to a queue via a sink for convenience

    Append a command request to a queue via a sink for convenience

    A

    The type of data to carry through

    returns

    a sink that takes a command and returns with an acknowledgement

    Definition Classes
    DurableQueue
    Annotations
    @SuppressWarnings()
  19. def source(topic: Topic, offset: Option[Long], finite: Boolean): Source[Received, NotUsed]

    Tail the queue for received events

    Tail the queue for received events

    topic

    the specific topic to tail

    offset

    an optional index at which to start tailing

    finite

    if true, stop tailing once the end of the queue has been reached

    returns

    a source representing the tail of events

    Definition Classes
    DurableQueue
  20. def source(topic: Topic, offset: Option[Long]): Source[Received, NotUsed]

    Tail the queue for received events

    Tail the queue for received events

    topic

    the specific topic to tail

    offset

    an optional index at which to start tailing

    returns

    a source representing the tail of events

    Definition Classes
    DurableQueue
  21. def source(topic: Topic): Source[Received, NotUsed]

    Tail the queue for received events

    Tail the queue for received events

    topic

    the specific topic to tail

    returns

    a source representing the tail of events

    Definition Classes
    DurableQueue
  22. def sourceEvent(topic: Topic, offset: Option[Long], finite: Boolean): Source[Event, NotUsed]

    Tail the queue for a variety of events

    Tail the queue for a variety of events

    topic

    the specific topic to tail

    offset

    an optional index at which to start tailing

    finite

    if true, stop tailing once the end of the queue has been reached

    returns

    a source representing the tail of events

    Definition Classes
    InMemoryQueueDurableQueue
    Annotations
    @SuppressWarnings()
  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  28. def withNamespace(namespace: String): DurableQueue

    Returns a DurableQueue instance that guarantees that all topic access is within the provided namespace.

    Returns a DurableQueue instance that guarantees that all topic access is within the provided namespace.

    Definition Classes
    DurableQueue

Inherited from DurableQueue

Inherited from AnyRef

Inherited from Any

Ungrouped