@Override public boolean allowsWrites() { return original.allowsWrites() && wrapping.allowsWrites(); }
@Override public boolean allowsWrites() { return wrapping.allowsWrites(); }
@Override public RawIterator<Object[],ProcedureException> procedureCallWrite( int id, Object[] arguments ) throws ProcedureException { AccessMode accessMode = ktx.securityContext().mode(); if ( !accessMode.allowsWrites() ) { throw accessMode.onViolation( format( "Write operations are not allowed for %s.", ktx.securityContext().description() ) ); } return callProcedure( id, arguments, new RestrictedAccessMode( ktx.securityContext().mode(), AccessMode.Static.TOKEN_WRITE ) ); }
@Override public RawIterator<Object[],ProcedureException> procedureCallWrite( QualifiedName name, Object[] arguments ) throws ProcedureException { AccessMode accessMode = ktx.securityContext().mode(); if ( !accessMode.allowsWrites() ) { throw accessMode.onViolation( format( "Write operations are not allowed for %s.", ktx.securityContext().description() ) ); } return callProcedure( name, arguments, new RestrictedAccessMode( ktx.securityContext().mode(), AccessMode.Static.TOKEN_WRITE ) ); }
@Override protected long fetchNext() { ktx.assertOpen(); while ( cursor.next() ) { long reference = cursor.nodeReference(); if ( ktx.dataRead().nodeExists( reference ) ) { return reference; } else if ( ktx.securityContext().mode().allowsWrites() ) { //remove it from index so it doesn't happen again try { NODE.remove( ktx.indexWrite(), name, reference ); } catch ( ExplicitIndexNotFoundKernelException | InvalidTransactionTypeKernelException e ) { //ignore } } } close(); return NO_ID; }
@Override protected long fetchNext() { ktx.assertOpen(); while ( cursor.next() ) { long reference = cursor.relationshipReference(); if ( ktx.dataRead().relationshipExists( reference ) ) { return reference; } else if ( ktx.securityContext().mode().allowsWrites() ) { //remove it from index so it doesn't happen again try { RELATIONSHIP.remove( ktx.indexWrite(), name, reference ); } catch ( ExplicitIndexNotFoundKernelException | InvalidTransactionTypeKernelException e ) { //ignore } } } close(); return NO_ID; }
@Override public boolean allowsWrites() { return wrapping.allowsWrites(); }
@Override public boolean allowsWrites() { return original.allowsWrites() && wrapping.allowsWrites(); }
@Override public RawIterator<Object[],ProcedureException> procedureCallWrite( int id, Object[] arguments ) throws ProcedureException { AccessMode accessMode = ktx.securityContext().mode(); if ( !accessMode.allowsWrites() ) { throw accessMode.onViolation( format( "Write operations are not allowed for %s.", ktx.securityContext().description() ) ); } return callProcedure( id, arguments, new RestrictedAccessMode( ktx.securityContext().mode(), AccessMode.Static.TOKEN_WRITE ) ); }
@Override public RawIterator<Object[],ProcedureException> procedureCallWrite( QualifiedName name, Object[] arguments ) throws ProcedureException { AccessMode accessMode = ktx.securityContext().mode(); if ( !accessMode.allowsWrites() ) { throw accessMode.onViolation( format( "Write operations are not allowed for %s.", ktx.securityContext().description() ) ); } return callProcedure( name, arguments, new RestrictedAccessMode( ktx.securityContext().mode(), AccessMode.Static.TOKEN_WRITE ) ); }
@Override protected long fetchNext() { ktx.assertOpen(); while ( cursor.next() ) { long reference = cursor.nodeReference(); if ( ktx.dataRead().nodeExists( reference ) ) { return reference; } else if ( ktx.securityContext().mode().allowsWrites() ) { //remove it from index so it doesn't happen again try { NODE.remove( ktx.indexWrite(), name, reference ); } catch ( ExplicitIndexNotFoundKernelException | InvalidTransactionTypeKernelException e ) { //ignore } } } close(); return NO_ID; }
@Override protected long fetchNext() { ktx.assertOpen(); while ( cursor.next() ) { long reference = cursor.relationshipReference(); if ( ktx.dataRead().relationshipExists( reference ) ) { return reference; } else if ( ktx.securityContext().mode().allowsWrites() ) { //remove it from index so it doesn't happen again try { RELATIONSHIP.remove( ktx.indexWrite(), name, reference ); } catch ( ExplicitIndexNotFoundKernelException | InvalidTransactionTypeKernelException e ) { //ignore } } } close(); return NO_ID; }