use of com.orientechnologies.orient.core.index.engine.OHashTableIndexEngine 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;
}
Aggregations