本文整理汇总了Java中com.orientechnologies.orient.core.storage.OStorage类的典型用法代码示例。如果您正苦于以下问题:Java OStorage类的具体用法?Java OStorage怎么用?Java OStorage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OStorage类属于com.orientechnologies.orient.core.storage包,在下文中一共展示了OStorage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: replaceStorage
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
/**
* Updates local pooled connections to use the given storage.
*
* @since 3.next
*
* @deprecated temporary workaround for https://www.prjhub.com/#/issues/9594
*/
@Deprecated
public void replaceStorage(final OStorage storage) {
if (partitionsField != null) {
try {
// use reflection as workaround until public API is available
for (Object partition : (Object[]) partitionsField.get(delegate)) {
for (ODatabaseDocumentTx db : (Iterable<ODatabaseDocumentTx>) partitionQueueField.get(partition)) {
db.replaceStorage(storage);
// need to bypass 'open-ness' check in getMetadata()
Object metadata = databaseMetadataField.get(db);
if (metadata instanceof OMetadata) {
((OMetadata) metadata).reload();
}
}
}
}
catch (Exception | LinkageError e) {
log.warn("Problem replacing storage for {}", storage.getName(), e);
}
}
}
开发者ID:sonatype,项目名称:nexus-public,代码行数:29,代码来源:DatabasePoolImpl.java
示例2: replaceStorage
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
@Override
public void replaceStorage(final OStorage storage) {
DatabasePoolImpl pool;
synchronized (pools) {
pool = pools.get(storage.getName());
}
if (pool != null) {
pool.replaceStorage(storage);
}
}
开发者ID:sonatype,项目名称:nexus-public,代码行数:11,代码来源:DatabaseManagerSupport.java
示例3: OLuceneSpatialIndexEngineDelegate
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
public OLuceneSpatialIndexEngineDelegate(String name, Boolean durableInNonTxMode, OStorage storage, int version) {
this.indexName = name;
this.durableInNonTxMode = durableInNonTxMode;
this.storage = storage;
this.version = version;
}
开发者ID:orientechnologies,项目名称:orientdb-spatial,代码行数:8,代码来源:OLuceneSpatialIndexEngineDelegate.java
示例4: getUnderlyingStorage
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
protected OStorage getUnderlyingStorage(OStorage storage) {
OStorage underlying = storage.getUnderlying();
if (underlying != storage) {
return getUnderlyingStorage(underlying);
} else {
return underlying;
}
}
开发者ID:mondo-project,项目名称:mondo-hawk,代码行数:9,代码来源:RemoteOrientDatabase.java
示例5: shutdown
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
private void shutdown(boolean delete) throws Exception {
if (pool == null || pool.isClosed()) {
return;
}
ODatabaseDocumentTx db = getGraphNoCreate();
if (delete) {
discardDirty();
} else {
saveDirty();
}
synchronized (allConns) {
// Close all other connections
for (ODatabaseDocumentTx conn : allConns) {
if (conn != db) {
pool.invalidateObject(conn);
}
}
dbConn.get().activateOnCurrentThread();
/*
* We want to completely close the database (e.g. so we can delete
* the directory later from the Hawk UI).
*/
final OStorage storage = db.getStorage();
if (delete) {
db.drop();
} else {
db.close();
}
storage.close(true, false);
Orient.instance().unregisterStorage(storage);
pool.invalidateObject(db);
if (delete && storageFolder != null) {
try {
deleteRecursively(storageFolder);
} catch (IOException e) {
console.printerrln(e);
}
}
pool.clear();
}
metamodelIndex = fileIndex = null;
storageFolder = tempFolder = null;
}
开发者ID:mondo-project,项目名称:mondo-hawk,代码行数:50,代码来源:OrientDatabase.java
示例6: getStorage
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
private OStorage getStorage() {
return ODatabaseRecordThreadLocal.INSTANCE.get().getDatabaseOwner().getStorage();
}
开发者ID:OrienteerBAP,项目名称:wicket-orientdb,代码行数:4,代码来源:OClusterModel.java
示例7: loadStorage
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
@Override
public OStorage loadStorage(String iURL) {
return getInstance().loadStorage(iURL);
}
开发者ID:wisdom-framework,项目名称:wisdom-orientdb,代码行数:5,代码来源:OrientDbManagerComp.java
示例8: registerStorage
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
@Override
public OStorage registerStorage(OStorage storage) throws IOException {
return getInstance().registerStorage(storage);
}
开发者ID:wisdom-framework,项目名称:wisdom-orientdb,代码行数:5,代码来源:OrientDbManagerComp.java
示例9: getStorage
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
@Override
public OStorage getStorage(String dbName) {
return getInstance().getStorage(dbName);
}
开发者ID:wisdom-framework,项目名称:wisdom-orientdb,代码行数:5,代码来源:OrientDbManagerComp.java
示例10: unregisterStorage
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
@Override
public void unregisterStorage(OStorage storage) {
getInstance().unregisterStorage(storage);
}
开发者ID:wisdom-framework,项目名称:wisdom-orientdb,代码行数:5,代码来源:OrientDbManagerComp.java
示例11: getStorages
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
@Override
public Collection<OStorage> getStorages() {
return getInstance().getStorages();
}
开发者ID:wisdom-framework,项目名称:wisdom-orientdb,代码行数:5,代码来源:OrientDbManagerComp.java
示例12: createIndexEngine
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
@Override
public OIndexEngine createIndexEngine(String algorithm, String name, Boolean durableInNonTxMode, OStorage storage, int version,
Map<String, String> engineProperties) {
return new OLuceneSpatialIndexEngineDelegate(name, durableInNonTxMode, storage, version);
}
开发者ID:orientechnologies,项目名称:orientdb-spatial,代码行数:8,代码来源:OLuceneSpatialIndexFactory.java
示例13: replaceStorage
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
/**
* Updates local pooled connections to use the given storage.
*
* @since 3.next
*
* @deprecated temporary workaround for https://www.prjhub.com/#/issues/9594
*/
@Deprecated
void replaceStorage(OStorage storage);
开发者ID:sonatype,项目名称:nexus-public,代码行数:10,代码来源:DatabaseManager.java
示例14: onStorageRegistered
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
@Override
public void onStorageRegistered(OStorage storage) {
}
开发者ID:orientechnologies,项目名称:orientdb-lucene,代码行数:5,代码来源:OLuceneIndexManagerAbstract.java
示例15: onStorageUnregistered
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
@Override
public void onStorageUnregistered(OStorage storage) {
}
开发者ID:orientechnologies,项目名称:orientdb-lucene,代码行数:5,代码来源:OLuceneIndexManagerAbstract.java
示例16: loadStorage
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
OStorage loadStorage(String iURL);
开发者ID:wisdom-framework,项目名称:wisdom-orientdb,代码行数:2,代码来源:OrientDbManager.java
示例17: registerStorage
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
OStorage registerStorage(OStorage storage) throws IOException;
开发者ID:wisdom-framework,项目名称:wisdom-orientdb,代码行数:2,代码来源:OrientDbManager.java
示例18: getStorage
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
OStorage getStorage(String dbName);
开发者ID:wisdom-framework,项目名称:wisdom-orientdb,代码行数:2,代码来源:OrientDbManager.java
示例19: unregisterStorage
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
void unregisterStorage(OStorage storage);
开发者ID:wisdom-framework,项目名称:wisdom-orientdb,代码行数:2,代码来源:OrientDbManager.java
示例20: getStorages
import com.orientechnologies.orient.core.storage.OStorage; //导入依赖的package包/类
Collection<OStorage> getStorages();
开发者ID:wisdom-framework,项目名称:wisdom-orientdb,代码行数:2,代码来源:OrientDbManager.java
注:本文中的com.orientechnologies.orient.core.storage.OStorage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论