org.eclipse.birt.core.archive.IArchiveLockManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.eclipse.birt.runtime Show documentation
Show all versions of org.eclipse.birt.runtime Show documentation
A component of the BIRT runtime
package org.eclipse.birt.core.archive;
import java.io.IOException;
/**
* lock used by the report engine to synchronize the document archives.
* the call sequence of such a locker should be:
*
* Object lock = manager.lock("fileName");
* synchronized(lock)
* {
* ... process ...
* }
* manager.unlock(lock).
*
*/
public interface IArchiveLockManager
{
/**
* lock the object named by "name"
* @param name object name, the file name for file object.
* @return a locker used to lock the object.
*/
Object lock(String name) throws IOException;
/**
* unlock the object locked by "lock".
* @param lock the lock object return from lock().
*/
void unlock(Object lock);
}