Package com.opengamma.util.mongo

Examples of com.opengamma.util.mongo.MongoConnector


  public void persistentSubscriptionManagement() {
    ExternalScheme idScheme = ExternalScheme.of("TestDomain");
    MockLiveDataServer server = new MockLiveDataServer(idScheme, _cacheManager);
    server.connect();
   
    MongoConnector connector = MongoTestUtils.makeTestConnector(MongoDBPersistentSubscriptionManagerTest.class.getSimpleName(), true);
    MongoDBPersistentSubscriptionManager manager = new MongoDBPersistentSubscriptionManager(server, connector);
    manager.clean();
   
    assertTrue(manager.getPersistentSubscriptions().isEmpty());
View Full Code Here


   * @param testClass  the test class, not null
   * @param makeUnique  whether to make the database totally unique
   * @return the wrapped provider, not null
   */
  public static MongoDBValueCachingReferenceDataProvider makeMongoProvider(ReferenceDataProvider underlying, Class<?> testClass, boolean makeUnique) {
    MongoConnector mongoConnector = getMongoConnector(testClass, makeUnique);
    MongoDBValueCachingReferenceDataProvider mongoProvider = new MongoDBValueCachingReferenceDataProvider(underlying, mongoConnector);
    return mongoProvider;
  }
View Full Code Here

   * Creates a Mongo caching reference data provider for testing.
   *
   * @return the provider, not null
   */
  public static ReferenceDataProvider getMongoCachingReferenceDataProvider(BloombergReferenceDataProvider bbgProvider) {
    MongoConnector mongoConnector = BloombergTestUtils.getMongoConnector();
    return new MongoDBValueCachingReferenceDataProvider(bbgProvider, mongoConnector);
  }
View Full Code Here

  protected ReferenceDataProvider initReferenceDataProvider(ComponentRepository repo) {
    BloombergConnector bloombergConnector = getBloombergConnector();
    BloombergReferenceDataProvider underlying = new BloombergReferenceDataProvider(bloombergConnector);
    repo.registerLifecycle(underlying);
   
    MongoConnector mongoConnector = getMongoConnector();
    CacheManager cacheManager = getCacheManager();
    if (mongoConnector != null) {
      MongoDBInvalidFieldCachingReferenceDataProvider fieldCached = new MongoDBInvalidFieldCachingReferenceDataProvider(underlying, mongoConnector);
      return new MongoDBValueCachingReferenceDataProvider(fieldCached, mongoConnector);
     
View Full Code Here

TOP

Related Classes of com.opengamma.util.mongo.MongoConnector

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.