be.wegenenverkeer.atomium.server.mongo

MongoFeedStore

Related Docs: object MongoFeedStore | package mongo

class MongoFeedStore[E] extends AbstractFeedStore[E, MongoContext]

An AbstractFeedStore implementation that stores feeds and pages in a MongoDB entriesCollection.

E

type of the elements in the feed

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MongoFeedStore
  2. AbstractFeedStore
  3. FeedStore
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MongoFeedStore(feedName: String, title: Option[String] = None, feedEntriesCollectionName: Option[String] = None, feedInfoCollectionName: String, ser: (E) ⇒ DBObject, deser: (DBObject) ⇒ E, url: Url)(implicit context: MongoContext)

    feedEntriesCollectionName

    name of the entriesCollection that contains the feed entries

    feedInfoCollectionName

    name of the entriesCollection that contains the feed info of all the feeds

    ser

    function to serialize an element to a DBObject

    deser

    function to deserialize a DBObject to an element

    url

    the base Url

    context

    a implicit MongoContext implementation

Type Members

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

    Attributes
    protected
    Definition Classes
    AbstractFeedStore

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[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. 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
  7. def dbObject2FeedEntry(dbo: DBObject): FeedEntry

    Attributes
    protected
  8. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  10. def feedEntry2DbObject(uuid: String, e: E): MongoDBObject

    Attributes
    protected
  11. def feedEntry2DbObject(e: E): MongoDBObject

    Attributes
    protected
  12. 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
    AbstractFeedStore
  13. def finalize(): Unit

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

    Attributes
    protected
    Definition Classes
    AbstractFeedStore
  15. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  16. def getFeed(start: Long, pageSize: Int, forward: Boolean)(implicit context: MongoContext): Option[Feed[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 None if the page is not found

    Definition Classes
    AbstractFeedStoreFeedStore
  17. def getFeedEntries(start: Long, count: Int, ascending: Boolean)(implicit context: MongoContext): 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

    Definition Classes
    MongoFeedStoreAbstractFeedStore
  18. def getHeadOfFeed(pageSize: Int)(implicit context: MongoContext): Option[Feed[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
    AbstractFeedStoreFeedStore
  19. def getMostRecentFeedEntries(count: Int)(implicit context: MongoContext): 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 containing tuples of a sequence number and its corresponding entry and sorted by descending sequence number

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

    Attributes
    protected
    Definition Classes
    AbstractFeedStore
  21. def getNextSequence: Long

    Attributes
    protected
  22. def getNumberOfEntriesLowerThan(sequenceNr: Long, inclusive: Boolean = true)(implicit context: MongoContext): 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 equal or lower than specified

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

    Attributes
    protected
    Definition Classes
    AbstractFeedStore
  24. def hashCode(): Int

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

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

    Attributes
    protected
    Definition Classes
    AbstractFeedStore
  27. def maxId(implicit context: MongoContext): Long

    returns

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

    Definition Classes
    MongoFeedStoreAbstractFeedStore
  28. def minId(implicit context: MongoContext): Long

    returns

    one less than the minimum sequence number used in this feed

    Definition Classes
    MongoFeedStoreAbstractFeedStore
  29. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  32. 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
  33. def push(uuid: String, entry: E)(implicit context: MongoContext): Unit

    Definition Classes
    MongoFeedStoreFeedStore
  34. def push(entries: Iterable[E])(implicit context: MongoContext): 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
    MongoFeedStoreFeedStore
  35. def push(entry: E)(implicit context: MongoContext): 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
  36. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  37. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AbstractFeedStore[E, MongoContext]

Inherited from FeedStore[E, MongoContext]

Inherited from AnyRef

Inherited from Any

Ungrouped