@Override
 public UniquenessConstraint uniquenessConstraintCreate(
     KernelStatement state, int labelId, int propertyKeyId)
     throws CreateConstraintFailureException, AlreadyConstrainedException,
         AlreadyIndexedException {
   state.locks().acquireExclusive(ResourceTypes.SCHEMA, schemaResource());
   return schemaWriteDelegate.uniquenessConstraintCreate(state, labelId, propertyKeyId);
 }
 @Override
 public void constraintDrop(KernelStatement state, UniquenessConstraint constraint)
     throws DropConstraintFailureException {
   state.locks().acquireExclusive(ResourceTypes.SCHEMA, schemaResource());
   schemaWriteDelegate.constraintDrop(state, constraint);
 }
 @Override
 public void uniqueIndexDrop(KernelStatement state, IndexDescriptor descriptor)
     throws DropIndexFailureException {
   state.locks().acquireExclusive(ResourceTypes.SCHEMA, schemaResource());
   schemaWriteDelegate.uniqueIndexDrop(state, descriptor);
 }
 @Override
 public IndexDescriptor indexCreate(KernelStatement state, int labelId, int propertyKey)
     throws AddIndexFailureException, AlreadyIndexedException, AlreadyConstrainedException {
   state.locks().acquireExclusive(ResourceTypes.SCHEMA, schemaResource());
   return schemaWriteDelegate.indexCreate(state, labelId, propertyKey);
 }
Ejemplo n.º 5
0
 @Override
 public void constraintDrop(KernelStatement state, UniquenessConstraint constraint)
     throws DropConstraintFailureException {
   state.locks().acquireSchemaWriteLock();
   schemaWriteDelegate.constraintDrop(state, constraint);
 }
Ejemplo n.º 6
0
 @Override
 public void uniqueIndexDrop(KernelStatement state, IndexDescriptor descriptor)
     throws DropIndexFailureException {
   state.locks().acquireSchemaWriteLock();
   schemaWriteDelegate.uniqueIndexDrop(state, descriptor);
 }