use of com.orientechnologies.orient.core.exception.OSchemaNotCreatedException in project orientdb by orientechnologies.
the class OSchemaShared method load.
@Override
public OSchemaShared load() {
rwSpinLock.acquireWriteLock();
try {
if (!new ORecordId(getDatabase().getStorage().getConfiguration().schemaRecordId).isValid())
throw new OSchemaNotCreatedException("Schema is not created and cannot be loaded");
((ORecordId) document.getIdentity()).fromString(getDatabase().getStorage().getConfiguration().schemaRecordId);
reload("*:-1 index:0");
snapshot = new OImmutableSchema(this);
return this;
} finally {
rwSpinLock.releaseWriteLock();
}
}
Aggregations