@Override public NodeGroupStore getNodeGroupStore(Config config) { return new MongoNodeGroupStore(config); }
public MongoNodeGroupStore(Config config) { super(config); setTableName(JobQueueUtils.NODE_GROUP_STORE); // create table DBCollection dbCollection = template.getCollection(); List<DBObject> indexInfo = dbCollection.getIndexInfo(); // create index if not exist if (CollectionUtils.sizeOf(indexInfo) <= 1) { template.ensureIndex("idx_nodeType_name", "nodeType,name", true, true); } }
public MongoNodeGroupStore(Config config) { super(config); setTableName(JobQueueUtils.NODE_GROUP_STORE); // create table DBCollection dbCollection = template.getCollection(); List<DBObject> indexInfo = dbCollection.getIndexInfo(); // create index if not exist if (CollectionUtils.sizeOf(indexInfo) <= 1) { template.ensureIndex("idx_nodeType_name", "nodeType,name", true, true); } }
public MongoNodeGroupStore(Config config) { super(config); setTableName(JobQueueUtils.NODE_GROUP_STORE); // create table DBCollection dbCollection = template.getCollection(); List<DBObject> indexInfo = dbCollection.getIndexInfo(); // create index if not exist if (CollectionUtils.sizeOf(indexInfo) <= 1) { template.ensureIndex("idx_nodeType_name", "nodeType,name", true, true); } }
@Override public NodeGroupStore getNodeGroupStore(Config config) { return new MongoNodeGroupStore(config); }
@Override public NodeGroupStore getNodeGroupStore(Config config) { return new MongoNodeGroupStore(config); }