uk.gov.hmrc.cache.repository

# CacheMongoRepository

###
Related Doc: package repository

#### class CacheMongoRepository extends ReactiveRepository[Cache, Id] with CacheRepository with TTLIndexing[Cache] with BSONBuilderHelpers

Linear Supertypes
BSONBuilderHelpers, TTLIndexing[Cache], CacheRepository, UniqueIndexViolationRecovery, ReactiveRepository[Cache, Id], CurrentTime, CollectionName, MongoDb, Indexes, AnyRef, Any
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. CacheMongoRepository
2. BSONBuilderHelpers
3. TTLIndexing
4. CacheRepository
5. UniqueIndexViolationRecovery
6. ReactiveRepository
7. CurrentTime
8. CollectionName
9. MongoDb
10. Indexes
11. AnyRef
12. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1. #### new CacheMongoRepository(collName: String, expireAfterSeconds: Long, cacheFormats: Format[Cache] = Cache.mongoFormats)(implicit mongo: () ⇒ DB, ec: ExecutionContext)

### Type Members

1. #### class BulkInsertRejected extends Exception

   Definition Classes
     ReactiveRepository

### 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 val AtomicId: String("atomicId")

5. #### final val Id: String("_id")

6. #### val _Id: String

   Attributes
     protected
   Definition Classes
     ReactiveRepository

7. #### def _id(id: Id): JsObject

   Attributes
     protected
   Definition Classes
     ReactiveRepository

8. #### def addToSet(value: BSONDocument): BSONDocument

   Definition Classes
     BSONBuilderHelpers

9. #### def and(search: BSONDocument*): BSONDocument

   Definition Classes
     BSONBuilderHelpers

10. #### final def asInstanceOf[T0]: T0

    Definition Classes
      Any

11. #### def bulkInsert(entities: Seq[Cache])(implicit ec: ExecutionContext): Future[MultiBulkWriteResult]

    Definition Classes
      ReactiveRepository

12. #### def clone(): AnyRef

    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

13. #### lazy val collection: JSONCollection

    Definition Classes
      ReactiveRepository

14. #### val collectionName: String

    Attributes
      protected[uk.gov.hmrc.mongo]
    Definition Classes
      ReactiveRepository → CollectionName

15. #### def count(query: JsObject, readPreference: ReadPreference)(implicit ec: ExecutionContext): Future[Int]

    Definition Classes
      ReactiveRepository

16. #### def count(implicit ec: ExecutionContext): Future[Int]

    Definition Classes
      ReactiveRepository

17. #### def createOrUpdate(id: Id, key: String, toCache: JsValue): Future[DatabaseUpdate[Cache]]

    Definition Classes
      CacheMongoRepository → CacheRepository

18. #### implicit val domainFormatImplicit: Format[Cache]

    Definition Classes
      ReactiveRepository

19. #### def drop(implicit ec: ExecutionContext): Future[Boolean]

    Definition Classes
      ReactiveRepository

20. #### def ensureIndexes(implicit ec: ExecutionContext): Future[Seq[Boolean]]

    Definition Classes
      TTLIndexing

21. #### final def eq(arg0: AnyRef): Boolean

    Definition Classes
      AnyRef

22. #### def equals(arg0: Any): Boolean

    Definition Classes
      AnyRef → Any

23. #### val expireAfterSeconds: Long

    Definition Classes
      CacheMongoRepository → TTLIndexing

24. #### def finalize(): Unit

    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )

25. #### def find(query: (String, JsValueWrapper)*)(implicit ec: ExecutionContext): Future[List[Cache]]

    Definition Classes
      ReactiveRepository

26. #### def findAll(readPreference: ReadPreference)(implicit ec: ExecutionContext): Future[List[Cache]]

    Definition Classes
      ReactiveRepository

27. #### def findAndUpdate(query: JsObject, update: JsObject, fetchNewObject: Boolean, upsert: Boolean, sort: Option[JsObject], fields: Option[JsObject], bypassDocumentValidation: Boolean, writeConcern: WriteConcern, maxTime: Option[FiniteDuration], collation: Option[Collation], arrayFilters: Seq[JsObject])(implicit ec: ExecutionContext): Future[reactivemongo.play.json.commands.JSONFindAndModifyCommand.FindAndModifyResult]

    Definition Classes
      ReactiveRepository

28. #### def findById(id: Id, readPreference: ReadPreference)(implicit ec: ExecutionContext): Future[Option[Cache]]

    Definition Classes
      ReactiveRepository

29. #### final def getClass(): Class[_]

    Definition Classes
      AnyRef → Any

30. #### def hashCode(): Int

    Definition Classes
      AnyRef → Any

31. #### implicit val idFormatImplicit: Format[Id]

    Definition Classes
      ReactiveRepository

32. #### def indexes: Seq[Index]

    Definition Classes
      Indexes

33. #### def insert(entity: Cache)(implicit ec: ExecutionContext): Future[WriteResult]

    Definition Classes
      ReactiveRepository

34. #### final def isInstanceOf[T0]: Boolean

    Definition Classes
      Any

35. #### val logger: Logger

    Attributes
      protected[this]
    Definition Classes
      ReactiveRepository

36. #### val message: String

    Definition Classes
      ReactiveRepository

37. #### val mongo: () ⇒ DB

    Attributes
      protected[uk.gov.hmrc.mongo]
    Definition Classes
      ReactiveRepository → MongoDb

38. #### final def ne(arg0: AnyRef): Boolean

    Definition Classes
      AnyRef

39. #### final def notify(): Unit

    Definition Classes
      AnyRef

40. #### final def notifyAll(): Unit

    Definition Classes
      AnyRef

41. #### def or(search: BSONDocument*): BSONDocument

    Definition Classes
      BSONBuilderHelpers

42. #### def recoverFromViolation[A](result: Future[A], fallback: ⇒ Future[A]): Future[A]

    Definition Classes
      UniqueIndexViolationRecovery

43. #### def remove(query: (String, JsValueWrapper)*)(implicit ec: ExecutionContext): Future[WriteResult]

    Definition Classes
      ReactiveRepository

44. #### def removeAll(writeConcern: WriteConcern)(implicit ec: ExecutionContext): Future[WriteResult]

    Definition Classes
      ReactiveRepository

45. #### def removeById(id: Id, writeConcern: WriteConcern)(implicit ec: ExecutionContext): Future[WriteResult]

    Definition Classes
      ReactiveRepository

46. #### def saveOrUpdate(findQuery: ⇒ Future[Option[Cache]], ifNotFound: ⇒ Future[Cache], modifiers: (Cache) ⇒ Cache)(implicit ec: ExecutionContext): Future[DatabaseUpdate[Cache]]

    Attributes
      protected
    Definition Classes
      CacheRepository

47. #### def set(value: BSONDocument): BSONDocument

    Definition Classes
      BSONBuilderHelpers

48. #### def setOnInsert(value: BSONDocument): BSONDocument

    Definition Classes
      BSONBuilderHelpers

49. #### final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
      AnyRef

50. #### def toString(): String

    Definition Classes
      AnyRef → Any

51. #### final def wait(): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

52. #### final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

53. #### final def wait(arg0: Long): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

54. #### def withCurrentTime[A](f: (DateTime) ⇒ A): A

    Definition Classes
      CurrentTime

55. #### lazy val zone: DateTimeZone

    Attributes
      protected
    Definition Classes
      CurrentTime

### Deprecated Value Members

1. #### def save(entity: Cache)(implicit ec: ExecutionContext): Future[WriteResult]

   Definition Classes
     ReactiveRepository
   Annotations
     @deprecated
   Deprecated

     (Since version 3.0.1) use ReactiveRepository#insert() instead

### Inherited from BSONBuilderHelpers

### Inherited from TTLIndexing[Cache]

### Inherited from CacheRepository

### Inherited from UniqueIndexViolationRecovery

### Inherited from ReactiveRepository[Cache, Id]

### Inherited from CurrentTime

### Inherited from CollectionName

### Inherited from MongoDb

### Inherited from Indexes

### Inherited from AnyRef

### Inherited from Any

### Ungrouped