Class MongoDBKnowledgeBaseCache
- java.lang.Object
-
- com.sonyericsson.jenkins.plugins.bfa.db.MongoDBKnowledgeBaseCache
-
public class MongoDBKnowledgeBaseCache extends Object
Cache for the MongoDBKnowledgeBase.- Author:
- Tomas Westling <tomas.westling@sonyericsson.com>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
MongoDBKnowledgeBaseCache.UpdateThread
The thread responsible for updating the MongoDB cache.
-
Constructor Summary
Constructors Constructor Description MongoDBKnowledgeBaseCache(org.mongojack.JacksonMongoCollection<FailureCause> jacksonCollection)
Standard constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getCategories()
Getter for the categories of all FailureCauses.List<FailureCause>
getCauses()
Getter for the cachedFailureCauses.void
start()
Run when the cache, including the update mechanism, should start running.void
stop()
Run when we want to shut down the cache.void
updateCache()
Signal that an update of the Cache should be made.
-
-
-
Constructor Detail
-
MongoDBKnowledgeBaseCache
public MongoDBKnowledgeBaseCache(org.mongojack.JacksonMongoCollection<FailureCause> jacksonCollection)
Standard constructor.- Parameters:
jacksonCollection
- the JacksonDBCollection, used for accessing the database.
-
-
Method Detail
-
start
public void start()
Run when the cache, including the update mechanism, should start running.
-
stop
public void stop()
Run when we want to shut down the cache.
-
updateCache
public void updateCache()
Signal that an update of the Cache should be made.
-
getCauses
public List<FailureCause> getCauses()
Getter for the cachedFailureCauses.- Returns:
- the causes.
-
-