private NodeAVL next(Session session, PersistentStore store, NodeAVL x) {

        if (x == null) {
            return null;
        }

        readLock.lock();

        try {
            while (true) {
                x = next(store, x);

                if (x == null) {
                    return x;
                }

                if (session == null) {
                    return x;
                }

                Row row = x.getRow(store);

                if (session.database.txManager.canRead(session, row)) {
                    return x;
                }
            }
        } finally {
            readLock.unlock();
        }
    }
private NodeAVL next ( Session session , PersistentStore store , NodeAVL x ) { if ( x == null ) { return null ; } readLock . lock ( ) ; try { while ( true ) { x = next ( store , x ) ; if ( x == null ) { return x ; } if ( session == null ) { return x ; } Row row = x . getRow ( store ) ; if ( session . database . txManager . canRead ( session , row ) ) { return x ; } } } finally { readLock . unlock ( ) ; } }
Returns the node after the given one

@param x node

@return next node