Package com.ikanow.infinit.e.data_model.store.config.source

Examples of com.ikanow.infinit.e.data_model.store.config.source.SimpleFederatedCache


  }
  public void test_cacheFill(String testName, boolean fill, boolean shouldBeFull) {
    DBCollection endpointCacheCollection = getCacheCollection();
    if (fill) {
      for (long i = 0; i < (1 + SimpleFederatedCache.QUERY_FEDERATION_CACHE_CLEANSE_SIZE); ++i) {
        SimpleFederatedCache fakeCacheElement = new SimpleFederatedCache();
        fakeCacheElement.expiryDate = new Date(new Date().getTime() - 3600L*1000L); // (ie expired an hour ago)
        fakeCacheElement._id = testName + "_" + i;
        fakeCacheElement.cachedJson = new BasicDBObject();
        endpointCacheCollection.save(fakeCacheElement.toDb());
      }
      _lastChecked = new Date(new Date().getTime() - 602L*1000L).getTime();
    }
    long count = endpointCacheCollection.count();
    if (shouldBeFull) {
View Full Code Here

TOP

Related Classes of com.ikanow.infinit.e.data_model.store.config.source.SimpleFederatedCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.