use of com.orientechnologies.orient.core.index.engine.ORemoteIndexEngine in project orientdb by orientechnologies.
the class OHashIndexFactory method createIndexEngine.
@Override
public OIndexEngine createIndexEngine(final String algoritm, final String name, final Boolean durableInNonTxMode, final OStorage storage, final int version, final Map<String, String> engineProperties) {
OIndexEngine indexEngine;
final String storageType = storage.getType();
if (storageType.equals("memory") || storageType.equals("plocal"))
indexEngine = new OHashTableIndexEngine(name, durableInNonTxMode, (OAbstractPaginatedStorage) storage, version);
else if (storageType.equals("distributed"))
// DISTRIBUTED CASE: HANDLE IT AS FOR LOCAL
indexEngine = new OHashTableIndexEngine(name, durableInNonTxMode, (OAbstractPaginatedStorage) storage.getUnderlying(), version);
else if (storageType.equals("remote"))
indexEngine = new ORemoteIndexEngine(name);
else
throw new OIndexException("Unsupported storage type: " + storageType);
return indexEngine;
}
use of com.orientechnologies.orient.core.index.engine.ORemoteIndexEngine in project orientdb by orientechnologies.
the class ODefaultIndexFactory method createIndexEngine.
@Override
public OIndexEngine createIndexEngine(String algorithm, String name, Boolean durableInNonTxMode, OStorage storage, int version, Map<String, String> engineProperties) {
final OIndexEngine indexEngine;
final String storageType = storage.getType();
if (storageType.equals("memory") || storageType.equals("plocal"))
indexEngine = new OSBTreeIndexEngine(name, durableInNonTxMode, (OAbstractPaginatedStorage) storage, version);
else if (storageType.equals("distributed"))
// DISTRIBUTED CASE: HANDLE IT AS FOR LOCAL
indexEngine = new OSBTreeIndexEngine(name, durableInNonTxMode, (OAbstractPaginatedStorage) storage.getUnderlying(), version);
else if (storageType.equals("remote"))
indexEngine = new ORemoteIndexEngine(name);
else
throw new OIndexException("Unsupported storage type: " + storageType);
return indexEngine;
}
Aggregations