org.qedeq.kernel.bo.module
Interface ModuleArbiter

All Known Implementing Classes:
ModuleArbiterImpl

public interface ModuleArbiter

Get locks for modules.

Author:
Michael Meyling

Method Summary
 QedeqBoSet getBlockedModules(ServiceJob process)
          Get all blocked modules from given process.
 boolean lockRequiredModule(InternalModuleServiceCall call)
          Lock QEDEQ module for exclusive read and write access.
 boolean unlockRequiredModule(InternalModuleServiceCall call)
          Unlock module again.
 

Method Detail

lockRequiredModule

boolean lockRequiredModule(InternalModuleServiceCall call)
                           throws InterruptException
Lock QEDEQ module for exclusive read and write access.

Parameters:
call - This service call acquires the lock.
Returns:
The call locked this module newly. Before this call the module was not locked.
Throws:
InterruptException - Lock acquirement interrupted.

unlockRequiredModule

boolean unlockRequiredModule(InternalModuleServiceCall call)
Unlock module again.

Parameters:
call - This call must have acquired the lock.
Returns:
Was this module even locked?

getBlockedModules

QedeqBoSet getBlockedModules(ServiceJob process)
Get all blocked modules from given process.

Parameters:
process - Get all modules blocked by this job.
Returns:
Set of blocked modules.


Copyright © 2014. All Rights Reserved.