be.wegenenverkeer.atomium.server

MemoryFeedStore

class MemoryFeedStore[T, C <: Context] extends AbstractFeedStore[T, C]

An in memory feedstore. This implementation is very inefficient and should only be used for demo or test purposes

T

the type for the content of the generated feed

Linear Supertypes
AbstractFeedStore[T, C], FeedStoreSupport[T], FeedStore[T, C], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MemoryFeedStore
  2. AbstractFeedStore
  3. FeedStoreSupport
  4. FeedStore
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MemoryFeedStore(feedName: String, url: Url, title: Option[String], contentType: String)

    feedName

    the name of the feed

    url

    the base Url

    title

    the optional title of the feed

    contentType

    the content type of the entries in the feed

Type Members

  1. case class FeedEntry(sequenceNr: Long, entry: Entry[E]) extends Product with Serializable

    Definition Classes
    FeedStoreSupport
  2. case class FeedParams(feedName: String, baseUrl: Url, title: Option[String]) extends Product with Serializable

    Definition Classes
    FeedStoreSupport
  3. case class ProcessedFeedEntries(previousSequenceNr: Option[Long], feedEntries: List[FeedEntry], nextSequenceNr: Option[Long]) extends Product with Serializable

    Definition Classes
    FeedStoreSupport

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clear(): Unit

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def close(): Unit

    This method is called when the be.wegenenverkeer.atomium.server.FeedService is stopped.

    This method is called when the be.wegenenverkeer.atomium.server.FeedService is stopped.

    Definition Classes
    FeedStore
  10. def count: Int

  11. def entriesWithIndex: ListBuffer[FeedEntry]

  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def feedLink(startId: Long, count: Int, forward: Boolean): Url

    Creates a link to a feed page.

    Creates a link to a feed page.

    startId

    the starting entry's id (non inclusive)

    count

    the number of entries in the page

    forward

    if true navigate to 'previous' elements in feed (towards head of feed) else navigate to 'next' elements in feed (towards last page of feed)

    returns

    the URL

    Attributes
    protected
    Definition Classes
    FeedStoreSupport
  15. implicit val feedParams: FeedParams

    Definition Classes
    AbstractFeedStore
  16. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def generateEntryID(): String

    Attributes
    protected
    Definition Classes
    FeedStoreSupport
  18. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  19. def getFeed(start: Long, pageSize: Int, forward: Boolean)(implicit context: C): Option[Feed[T]]

    Retrieves a page of the feed.

    Retrieves a page of the feed.

    start

    the starting entry (exclusive), should not be returned in the feed page

    pageSize

    the number of entries

    forward

    if true navigate to 'previous' elements in feed (towards head of feed) else navigate to 'next' elements in feed (towards last page of feed)

    returns

    the feed page or None if the page is not found

    Definition Classes
    AbstractFeedStoreFeedStore
  20. def getFeedEntries(start: Long, pageSize: Int, forward: Boolean)(implicit context: C): List[FeedEntry]

    start

    the start entry

    pageSize

    the number of entries to return

    returns

    pageSize entries starting from start

    Definition Classes
    MemoryFeedStoreAbstractFeedStore
  21. def getHeadOfFeed(pageSize: Int)(implicit context: C): Option[Feed[T]]

    Retrieves the head of the feed.

    Retrieves the head of the feed. This is the first page containing the most recent entries

    pageSize

    the maximum number of feed entries to return. The page could contain less entries

    returns

    the head of the feed

    Definition Classes
    AbstractFeedStoreFeedStore
  22. def getMostRecentFeedEntries(count: Int)(implicit context: C): List[FeedEntry]

    Retrieves the most recent entries from the FeedStore sorted in descending order

    Retrieves the most recent entries from the FeedStore sorted in descending order

    count

    the amount of recent entries to return

    returns

    a list of FeedEntries. a FeedEntry is a sequence number and its corresponding entry and sorted by descending sequence number

    Definition Classes
    MemoryFeedStoreAbstractFeedStore
  23. def getNextLink(id: Long, count: Int, next: Option[Long]): Option[Link]

    Definition Classes
    FeedStoreSupport
  24. def getNumberOfEntriesLowerThan(sequenceNr: Long, inclusive: Boolean = true)(implicit context: C): Long

    sequenceNr

    sequence number to match

    inclusive

    if true include the specified sequence number

    returns

    the total number of entries in the feed

    Definition Classes
    MemoryFeedStoreAbstractFeedStore
  25. def getPreviousLink(id: Long, count: Int, previous: Option[Long]): Option[Link]

    Definition Classes
    FeedStoreSupport
  26. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  27. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  28. def link(l: String, start: Long, pageSize: Int, forward: Boolean): Link

    Attributes
    protected
    Definition Classes
    FeedStoreSupport
  29. def maxId(implicit context: C): Long

    returns

    the maximum sequence number used in this feed or minId if feed is empty

    Definition Classes
    MemoryFeedStoreAbstractFeedStore
  30. def minId(implicit context: C): Long

    returns

    one less than the minimum sequence number used in this feed

    Definition Classes
    MemoryFeedStoreAbstractFeedStore
  31. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  32. final def notify(): Unit

    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  34. def open(): Unit

    This method is called when the be.wegenenverkeer.atomium.server.FeedService is started.

    This method is called when the be.wegenenverkeer.atomium.server.FeedService is started. This can be used as a hook (to check consistency, for example)

    Definition Classes
    FeedStore
  35. def processBackwardEntries(start: Long, pageSize: Int, entries: List[FeedEntry]): ProcessedFeedEntries

    Definition Classes
    FeedStoreSupport
  36. def processFeedEntries(start: Long, minId: Long, pageSize: Int, forward: Boolean, entries: List[FeedEntry])(implicit feedParams: FeedParams): Option[Feed[T]]

    Definition Classes
    FeedStoreSupport
  37. def processForwardEntries(start: Long, pageSize: Int, entries: List[FeedEntry]): ProcessedFeedEntries

    Definition Classes
    FeedStoreSupport
  38. def processHeadFeedEntries(numberOfEntriesLower: Long, minId: Long, pageSize: Int, entries: List[FeedEntry])(implicit feedParams: FeedParams): Option[Feed[T]]

    Definition Classes
    FeedStoreSupport
  39. def push(uuid: String, entry: T)(implicit context: C): Unit

    Definition Classes
    MemoryFeedStoreFeedStore
  40. def push(it: Iterable[T])(implicit context: C): Unit

    push a list of entries to the feed

    push a list of entries to the feed

    Definition Classes
    MemoryFeedStoreFeedStore
  41. def push(entry: T)(implicit context: C): Unit

    push a single entry to the feed

    push a single entry to the feed

    entry

    the entry to push to the feed

    Definition Classes
    FeedStore
  42. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  43. def toFeed(pageSize: Int, minId: Long, entries: List[FeedEntry], previousEntryId: Option[Long], nextEntryId: Option[Long])(implicit feedParams: FeedParams): Option[Feed[T]]

    pageSize

    the desired feed page size

    entries

    the entries to include in the feed

    previousEntryId

    the previous entry's id or None if we are at the head of the feed

    nextEntryId

    the next entry's id or None if we are at the tail of the feed (last page)

    returns

    a page feed or None

    Definition Classes
    FeedStoreSupport
  44. def toString(): String

    Definition Classes
    AnyRef → Any
  45. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AbstractFeedStore[T, C]

Inherited from FeedStoreSupport[T]

Inherited from FeedStore[T, C]

Inherited from AnyRef

Inherited from Any

Ungrouped