use of org.apache.rya.export.mongo.policy.TimestampPolicyMongoRyaStatementStore in project incubator-rya by apache.
the class StatementStoreFactory method getMergePolicyStatementStore.
private RyaStatementStore getMergePolicyStatementStore(final RyaStatementStore store, final MergePolicy policy, final String ryaInstanceName, final DBType dbType) {
RyaStatementStore policyStore = null;
if (policy == MergePolicy.TIMESTAMP) {
final TimestampPolicyMergeConfiguration timeConfig = (TimestampPolicyMergeConfiguration) configuration;
final Date timestamp = timeConfig.getToolStartTime();
if (dbType == DBType.MONGO) {
policyStore = new TimestampPolicyMongoRyaStatementStore((MongoRyaStatementStore) store, timestamp, ryaInstanceName);
} else {
policyStore = new TimestampPolicyAccumuloRyaStatementStore((AccumuloRyaStatementStore) store, timestamp);
}
}
return policyStore == null ? store : policyStore;
}
use of org.apache.rya.export.mongo.policy.TimestampPolicyMongoRyaStatementStore in project incubator-rya by apache.
the class StoreToStoreIT method getParentMongo.
private static TimestampPolicyMongoRyaStatementStore getParentMongo() throws Exception {
final MongoClient mongo = getNewMongoResources(RYA_INSTANCE);
final MongoDBRyaDAO dao = new MongoDBRyaDAO();
dao.setConf(new StatefulMongoDBRdfConfiguration(ITBase.getConf(mongo), mongo));
dao.init();
final MongoRyaStatementStore store = new MongoRyaStatementStore(mongo, RYA_INSTANCE, dao);
final TimestampPolicyMongoRyaStatementStore timeStore = new TimestampPolicyMongoRyaStatementStore(store, currentDate, RYA_INSTANCE);
clients.add(mongo);
return timeStore;
}
Aggregations