use of org.apache.atlas.type.AtlasTypeRegistry.AtlasTransientTypeRegistry in project incubator-atlas by apache.
the class AtlasTypeDefGraphStore method init.
@Override
public void init() throws AtlasBaseException {
AtlasTransientTypeRegistry ttr = null;
boolean commitUpdates = false;
try {
ttr = typeRegistry.lockTypeRegistryForUpdate(typeUpdateLockMaxWaitTimeSeconds);
ttr.clear();
AtlasTypesDef typesDef = new AtlasTypesDef(getEnumDefStore(ttr).getAll(), getStructDefStore(ttr).getAll(), getClassificationDefStore(ttr).getAll(), getEntityDefStore(ttr).getAll());
rectifyTypeErrorsIfAny(typesDef);
ttr.addTypes(typesDef);
commitUpdates = true;
} finally {
typeRegistry.releaseTypeRegistryForUpdate(ttr, commitUpdates);
}
}
use of org.apache.atlas.type.AtlasTypeRegistry.AtlasTransientTypeRegistry in project incubator-atlas by apache.
the class AtlasTypeDefGraphStore method updateClassificationDefByName.
@Override
@GraphTransaction
public AtlasClassificationDef updateClassificationDefByName(String name, AtlasClassificationDef classificationDef) throws AtlasBaseException {
AtlasTransientTypeRegistry ttr = lockTypeRegistryAndReleasePostCommit();
tryUpdateByName(name, classificationDef, ttr);
return getClassificationDefStore(ttr).updateByName(name, classificationDef);
}
use of org.apache.atlas.type.AtlasTypeRegistry.AtlasTransientTypeRegistry in project incubator-atlas by apache.
the class AtlasTypeDefGraphStore method updateStructDefByGuid.
@Override
@GraphTransaction
public AtlasStructDef updateStructDefByGuid(String guid, AtlasStructDef structDef) throws AtlasBaseException {
AtlasTransientTypeRegistry ttr = lockTypeRegistryAndReleasePostCommit();
tryUpdateByGUID(guid, structDef, ttr);
return getStructDefStore(ttr).updateByGuid(guid, structDef);
}
use of org.apache.atlas.type.AtlasTypeRegistry.AtlasTransientTypeRegistry in project incubator-atlas by apache.
the class AtlasTypeDefGraphStore method updateEntityDefByGuid.
@Override
@GraphTransaction
public AtlasEntityDef updateEntityDefByGuid(String guid, AtlasEntityDef entityDef) throws AtlasBaseException {
AtlasTransientTypeRegistry ttr = lockTypeRegistryAndReleasePostCommit();
tryUpdateByGUID(guid, entityDef, ttr);
return getEntityDefStore(ttr).updateByGuid(guid, entityDef);
}
use of org.apache.atlas.type.AtlasTypeRegistry.AtlasTransientTypeRegistry in project incubator-atlas by apache.
the class AtlasTypeDefGraphStore method updateStructDefByName.
@Override
@GraphTransaction
public AtlasStructDef updateStructDefByName(String name, AtlasStructDef structDef) throws AtlasBaseException {
AtlasTransientTypeRegistry ttr = lockTypeRegistryAndReleasePostCommit();
tryUpdateByName(name, structDef, ttr);
return getStructDefStore(ttr).updateByName(name, structDef);
}
Aggregations