Class

be.wegenenverkeer.atomium.server

AbstractFeedStore

Related Doc: package server

Permalink

abstract class AbstractFeedStore[E, C <: Context] extends FeedStore[E, C] with FeedStoreSupport[E]

A feed store is responsible for the persistence of feeds. This abstract class serves as a base class for more specific FeedStore implementations.

E

type of the elements in the feed

Linear Supertypes
FeedStoreSupport[E], FeedStore[E, C], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AbstractFeedStore
  2. FeedStoreSupport
  3. FeedStore
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

Type Members

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

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

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

    Permalink
    Definition Classes
    FeedStoreSupport

Abstract Value Members

  1. abstract def getFeedEntries(start: Long, count: Int, ascending: Boolean)(implicit context: C): List[FeedEntry]

    Permalink

    Retrieves entries with their sequence numbers from the feed

    Retrieves entries with their sequence numbers from the feed

    start

    the starting entry (inclusive), MUST be returned in the entries

    count

    the number of entries to return

    ascending

    if true return entries with sequence numbers >= start in ascending order else return entries with sequence numbers <= start in descending order

    returns

    the corresponding entries sorted accordingly

  2. abstract def getMostRecentFeedEntries(count: Int)(implicit context: C): List[FeedEntry]

    Permalink

    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

  3. abstract def getNumberOfEntriesLowerThan(sequenceNr: Long, inclusive: Boolean = true)(implicit context: C): Long

    Permalink

    sequenceNr

    sequence number to match

    inclusive

    if true include the specified sequence number

    returns

    the number of entries in the feed with sequence number lower than specified

  4. abstract def maxId(implicit context: C): Long

    Permalink

    returns

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

  5. abstract def minId(implicit context: C): Long

    Permalink

    returns

    one less than the minimum sequence number used in this feed

  6. abstract def push(uuid: String, entry: E)(implicit context: C): Unit

    Permalink
    Definition Classes
    FeedStore
  7. abstract def push(entries: Iterable[E])(implicit context: C): Unit

    Permalink

    push a list of entries to the feed

    push a list of entries to the feed

    entries

    the entries to push to the feed

    Definition Classes
    FeedStore

Concrete Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

    Permalink

    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
  7. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  9. def feedLink(startId: Long, count: Int, forward: Boolean): String

    Permalink

    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
  10. implicit val feedParams: FeedParams

    Permalink
  11. def finalize(): Unit

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

    Permalink
    Attributes
    protected
    Definition Classes
    FeedStoreSupport
  13. val generator: Generator

    Permalink
    Definition Classes
    FeedStoreSupport
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def getFeed(start: Long, pageSize: Int, forward: Boolean)(implicit context: C): Option[FeedPage[E]]

    Permalink

    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
  16. def getHeadOfFeed(pageSize: Int)(implicit context: C): FeedPage[E]

    Permalink

    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
  17. def getNextLink(id: Long, count: Int, next: Option[Long]): Option[Link]

    Permalink
    Definition Classes
    FeedStoreSupport
  18. def getPreviousLink(id: Long, count: Int, previous: Option[Long]): Option[Link]

    Permalink
    Definition Classes
    FeedStoreSupport
  19. def hashCode(): Int

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    FeedStoreSupport
  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. def open(): Unit

    Permalink

    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
  26. def processBackwardEntries(start: Long, pageSize: Int, entries: List[FeedEntry]): ProcessedFeedEntries

    Permalink
    Definition Classes
    FeedStoreSupport
  27. def processFeedEntries(start: Long, minId: Long, pageSize: Int, forward: Boolean, entries: List[FeedEntry])(implicit feedParams: FeedParams): FeedPage[E]

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

    Permalink
    Definition Classes
    FeedStoreSupport
  29. def processHeadFeedEntries(numberOfEntriesLower: Long, minId: Long, pageSize: Int, entries: List[FeedEntry])(implicit feedParams: FeedParams): FeedPage[E]

    Permalink
    Definition Classes
    FeedStoreSupport
  30. def push(entry: E)(implicit context: C): Unit

    Permalink

    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
  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  32. def toFeed(pageSize: Int, minId: Long, entries: List[FeedEntry], previousEntryId: Option[Long], nextEntryId: Option[Long])(implicit feedParams: FeedParams): FeedPage[E]

    Permalink

    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, possibly empty

    Definition Classes
    FeedStoreSupport
  33. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from FeedStoreSupport[E]

Inherited from FeedStore[E, C]

Inherited from AnyRef

Inherited from Any

Ungrouped