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
- Alphabetic
- By Inheritance
- AbstractFeedStore
- FeedStoreSupport
- FeedStore
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new AbstractFeedStore(feedName: String, title: Option[String], url: Url)
Type Members
-
case class
FeedEntry
(sequenceNr: Long, entry: Entry[E]) extends Product with Serializable
- Definition Classes
- FeedStoreSupport
-
case class
FeedParams
(feedName: String, baseUrl: Url, title: Option[String]) extends Product with Serializable
- Definition Classes
- FeedStoreSupport
-
case class
ProcessedFeedEntries
(previousSequenceNr: Option[Long], feedEntries: List[FeedEntry], nextSequenceNr: Option[Long]) extends Product with Serializable
- Definition Classes
- FeedStoreSupport
Abstract Value Members
-
abstract
def
getFeedEntries(start: Long, count: Int, ascending: Boolean)(implicit context: C): List[FeedEntry]
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
-
abstract
def
getMostRecentFeedEntries(count: Int)(implicit context: C): List[FeedEntry]
Retrieves the most recent entries from the
FeedStoresorted in descending orderRetrieves the most recent entries from the
FeedStoresorted 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
-
abstract
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 number of entries in the feed with sequence number lower than specified
-
abstract
def
maxId(implicit context: C): Long
- returns
the maximum sequence number used in this feed or minId if feed is empty
-
abstract
def
minId(implicit context: C): Long
- returns
one less than the minimum sequence number used in this feed
-
abstract
def
push(uuid: String, entry: E)(implicit context: C): Unit
- Definition Classes
- FeedStore
-
abstract
def
push(entries: Iterable[E])(implicit context: C): Unit
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
feedLink(startId: Long, count: Int, forward: Boolean): String
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
- implicit val feedParams: FeedParams
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
generateEntryID(): String
- Attributes
- protected
- Definition Classes
- FeedStoreSupport
-
val
generator: Generator
- Definition Classes
- FeedStoreSupport
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getFeed(start: Long, pageSize: Int, forward: Boolean)(implicit context: C): Option[FeedPage[E]]
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
Noneif the page is not found
- Definition Classes
- AbstractFeedStore → FeedStore
-
def
getHeadOfFeed(pageSize: Int)(implicit context: C): FeedPage[E]
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
- AbstractFeedStore → FeedStore
-
def
getNextLink(id: Long, count: Int, next: Option[Long]): Option[Link]
- Definition Classes
- FeedStoreSupport
-
def
getPreviousLink(id: Long, count: Int, previous: Option[Long]): Option[Link]
- Definition Classes
- FeedStoreSupport
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
link(l: String, start: Long, pageSize: Int, forward: Boolean): Link
- Attributes
- protected
- Definition Classes
- FeedStoreSupport
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
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
-
def
processBackwardEntries(start: Long, pageSize: Int, entries: List[FeedEntry]): ProcessedFeedEntries
- Definition Classes
- FeedStoreSupport
-
def
processFeedEntries(start: Long, minId: Long, pageSize: Int, forward: Boolean, entries: List[FeedEntry])(implicit feedParams: FeedParams): FeedPage[E]
- Definition Classes
- FeedStoreSupport
-
def
processForwardEntries(start: Long, pageSize: Int, entries: List[FeedEntry]): ProcessedFeedEntries
- Definition Classes
- FeedStoreSupport
-
def
processHeadFeedEntries(numberOfEntriesLower: Long, minId: Long, pageSize: Int, entries: List[FeedEntry])(implicit feedParams: FeedParams): FeedPage[E]
- Definition Classes
- FeedStoreSupport
-
def
push(entry: E)(implicit context: C): Unit
push a single entry to the feed
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toFeed(pageSize: Int, minId: Long, entries: List[FeedEntry], previousEntryId: Option[Long], nextEntryId: Option[Long])(implicit feedParams: FeedParams): FeedPage[E]
- 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
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )