Ceph 文件存储、对象存储、内存存储、KV存储支持: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;
}

 

你可能感兴趣的:(Ceph 文件存储、对象存储、内存存储、KV存储支持:ObjectStore::create)