All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.hajdbc.lock.semaphore.SemaphoreLockManagerFactory Maven / Gradle / Ivy

There is a newer version: 3.6.61
Show newest version
package net.sf.hajdbc.lock.semaphore;

import net.sf.hajdbc.lock.LockManager;
import net.sf.hajdbc.lock.LockManagerFactory;


public class SemaphoreLockManagerFactory implements LockManagerFactory
{
	private static final long serialVersionUID = -1330668107554832289L;

	private boolean fair;
	
	public void setFair(boolean fair)
	{
		this.fair = fair;
	}
	
	public boolean isFair()
	{
		return this.fair;
	}

	@Override
	public String getId()
	{
		return "semaphore";
	}
	
	@Override
	public LockManager createLockManager()
	{
		return new SemaphoreLockManager(this.fair);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy