syncbase/src/main/java/io/v/syncbase/Collection.java
/**
     * FOR ADVANCED USERS. Updates the {@code AccessList} for this collection. Users should
     * typically manipulate access lists via {@code collection.getSyncgroup()}.
     */
FOR ADVANCED USERS. Updates the  AccessList for this collection. Users should
typically manipulate access lists via  collection.getSyncgroup().
FOR ADVANCED USERS . Updates the AccessList for this collection . Users should typically manipulate access lists via collection . getSyncgroup () .
public void updateAccessList(final AccessList delta) throws SyncbaseException {
        final Id id = this.getId();
        Database.BatchOperation op = new Database.BatchOperation() {
            @Override
            public void run(BatchDatabase db) throws SyncbaseException {
                io.v.syncbase.core.Collection coreCollection = db.getCollection(id)
                        .mCoreCollection;
                try {
                    Permissions newPermissions = AccessList.applyDeltaForCollection(
                            coreCollection.getPermissions(), delta);
                    coreCollection.setPermissions(newPermissions);
                } catch (VError vError) {
                    chainThrow("setting permissions in collection", id.getName(), vError);
                }
            }
        };
        if (mDatabaseHandle instanceof BatchDatabase) {
            op.run((BatchDatabase) mDatabaseHandle);
        } else {
            ((Database) mDatabaseHandle).runInBatch(op);
        }
    }
public void updateAccessList ( final AccessList delta ) throws SyncbaseException { final Id id = this . getId ( ) ; Database . BatchOperation op = new Database . BatchOperation ( ) { @ Override public void run ( BatchDatabase db ) throws SyncbaseException { io . v . syncbase . core . Collection coreCollection = db . getCollection ( id ) . mCoreCollection ; try { Permissions newPermissions = AccessList . applyDeltaForCollection ( coreCollection . getPermissions ( ) , delta ) ; coreCollection . setPermissions ( newPermissions ) ; } catch ( VError vError ) { chainThrow ( "setting permissions in collection" , id . getName ( ) , vError ) ; } } } ; if ( mDatabaseHandle instanceof BatchDatabase ) { op . run ( ( BatchDatabase ) mDatabaseHandle ) ; } else { ( ( Database ) mDatabaseHandle ) . runInBatch ( op ) ; } }
FOR ADVANCED USERS.
FOR ADVANCED USERS .
// Create a batch if we're not already in a batch.