Search in sources :

Example 1 with DBCacheService

use of org.graylog2.lookup.db.DBCacheService in project graylog2-server by Graylog2.

the class LookupCacheFacadeTest method setUp.

@Before
@SuppressForbidden("Using Executors.newSingleThreadExecutor() is okay in tests")
public void setUp() throws Exception {
    final ClusterEventBus clusterEventBus = new ClusterEventBus("cluster-event-bus", Executors.newSingleThreadExecutor());
    cacheService = new DBCacheService(mongodb.mongoConnection(), new MongoJackObjectMapperProvider(objectMapper), clusterEventBus);
    pluginMetaData = new HashSet<>();
    facade = new LookupCacheFacade(objectMapper, cacheService, pluginMetaData);
}
Also used : MongoJackObjectMapperProvider(org.graylog2.bindings.providers.MongoJackObjectMapperProvider) ClusterEventBus(org.graylog2.events.ClusterEventBus) DBCacheService(org.graylog2.lookup.db.DBCacheService) Before(org.junit.Before) SuppressForbidden(org.graylog2.shared.SuppressForbidden)

Aggregations

MongoJackObjectMapperProvider (org.graylog2.bindings.providers.MongoJackObjectMapperProvider)1 ClusterEventBus (org.graylog2.events.ClusterEventBus)1 DBCacheService (org.graylog2.lookup.db.DBCacheService)1 SuppressForbidden (org.graylog2.shared.SuppressForbidden)1 Before (org.junit.Before)1