org.jgroups.blocks.locking.LockInfo Maven / Gradle / Ivy
Go to download
This artifact provides a single jar that contains all classes required to use remote EJB and JMS, including
all dependencies. It is intended for use by those not using maven, maven users should just import the EJB and
JMS BOM's instead (shaded JAR's cause lots of problems with maven, as it is very easy to inadvertently end up
with different versions on classes on the class path).
The newest version!
package org.jgroups.blocks.locking;
import java.util.concurrent.TimeUnit;
/**
* @author Bela Ban
*/
public class LockInfo {
protected final String name;
protected final boolean is_trylock;
protected final boolean lock_interruptibly;
protected final boolean use_timeout;
protected final long timeout;
protected final TimeUnit time_unit;
public LockInfo(String name, boolean is_trylock, boolean lock_interruptibly, boolean use_timeout,
long timeout, TimeUnit time_unit) {
this.name=name;
this.is_trylock=is_trylock;
this.lock_interruptibly=lock_interruptibly;
this.use_timeout=use_timeout;
this.timeout=timeout;
this.time_unit=time_unit;
}
public boolean isTrylock() {
return is_trylock;
}
public boolean isLockInterruptibly() {
return lock_interruptibly;
}
public boolean isUseTimeout() {
return use_timeout;
}
public String getName() {
return name;
}
public long getTimeout() {
return timeout;
}
public TimeUnit getTimeUnit() {
return time_unit;
}
public String toString() {
return name + ", trylock=" + is_trylock + ", timeout=" + timeout;
}
}