org.basex.core
Interface Locking

All Known Implementing Classes:
DBLocking

public interface Locking

Lock interface; will get obsolete after database locking has been finalized.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Method Summary
 void acquire(Proc pr, StringList read, StringList write)
          Puts read and write locks the specified databases.
 void downgrade(StringList write)
          Unlock all string locked by a transaction.
 void release(Proc pr)
          Unlock all string locked by a transaction.
 

Method Detail

acquire

void acquire(Proc pr,
             StringList read,
             StringList write)
Puts read and write locks the specified databases. Store and return the token for unlocking these objects again.

Parameters:
pr - process
read - names of databases to put read locks on. Global locking is performed if the passed on reference is null
write - names of databases to put write locks on. Global locking is performed if the passed on reference is null

downgrade

void downgrade(StringList write)
Unlock all string locked by a transaction.

Parameters:
write - write locks to keep

release

void release(Proc pr)
Unlock all string locked by a transaction.

Parameters:
pr - process