com.sonyericsson.jenkins.plugins.bfa.db
Class MongoDBKnowledgeBaseCache

java.lang.Object
  extended by 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
protected  class MongoDBKnowledgeBaseCache.UpdateThread
          The thread responsible for updating the MongoDB cache.
 
Constructor Summary
MongoDBKnowledgeBaseCache(net.vz.mongodb.jackson.JacksonDBCollection<FailureCause,String> jacksonCollection)
          Standard constructor.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MongoDBKnowledgeBaseCache

public MongoDBKnowledgeBaseCache(net.vz.mongodb.jackson.JacksonDBCollection<FailureCause,String> 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.

getCategories

public List<String> getCategories()
Getter for the categories of all FailureCauses.

Returns:
the categories.


Copyright © 2004-2014. All Rights Reserved.