Ceph file storage, object storage, memory storage, KV storage support: ObjectStore::create

ObjectStore *ObjectStore::create(CephContext *cct,
				 const string& type,
				 const string& data,
				 const string& journal,
			         osflagbits_t flags)
{
  if (type == "filestore") {
    return new FileStore(data, journal, flags);
  }
  if (type == "memstore") {
    return new MemStore(cct, data);
  }
  if (type == "keyvaluestore" &&
      cct->check_experimental_feature_enabled("keyvaluestore")) {
    return new KeyValueStore(data);
  }
#if defined(HAVE_LIBAIO)
  if (type == "newstore" &&
      cct->check_experimental_feature_enabled("newstore")) {
    return new NewStore(cct, data);
  }
#endif
  return NULL;
}

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326222373&siteId=291194637