/** Enhanced constructor that permits specifying an object to use as a lock. * The lock is used on entry and exit to {@link #readAccess} and during the * whole execution of {@link #writeAccess}. The ability to specify locks * allows several <code>Mutex</code>es to synchronize on one object or to synchronize * a mutex with another critical section. * * @param lock lock to use */ public Mutex(Object lock) { this.LOCK = init(lock); this.wrapper = null; }
/** Default constructor. */ public Mutex() { this.LOCK = init(new InternalLock()); this.wrapper = null; }
/** @param privileged can enter privileged states of this Mutex * This helps avoid creating of custom Runnables. */ public Mutex(Privileged privileged) { if (privileged == null) { throw new IllegalArgumentException("privileged == null"); //NOI18N } else { this.LOCK = init(new InternalLock()); privileged.setParent(this); } this.wrapper = null; }
/** Enhanced constructor that permits specifying an object to use as a lock. * The lock is used on entry and exit to {@link #readAccess} and during the * whole execution of {@link #writeAccess}. The ability to specify locks * allows several <code>Mutex</code>es to synchronize on one object or to synchronize * a mutex with another critical section. * * @param lock lock to use */ public Mutex (Object lock) { init(lock); }
/** Enhanced constructor that permits specifying an object to use as a lock. * The lock is used on entry and exit to {@link #readAccess} and during the * whole execution of {@link #writeAccess}. The ability to specify locks * allows several <code>Mutex</code>es to synchronize on one object or to synchronize * a mutex with another critical section. * * @param lock lock to use */ public Mutex(Object lock) { this.LOCK = init(lock); this.wrapper = null; }
/** Enhanced constructor that permits specifying an object to use as a lock. * The lock is used on entry and exit to {@link #readAccess} and during the * whole execution of {@link #writeAccess}. The ability to specify locks * allows several <code>Mutex</code>es to synchronize on one object or to synchronize * a mutex with another critical section. * * @param lock lock to use */ public Mutex(Object lock) { init(lock); this.wrapper = null; }
/** Enhanced constructor that permits specifying an object to use as a lock. * The lock is used on entry and exit to {@link #readAccess} and during the * whole execution of {@link #writeAccess}. The ability to specify locks * allows several <code>Mutex</code>es to synchronize on one object or to synchronize * a mutex with another critical section. * * @param lock lock to use */ public Mutex (Object lock) { init(lock); }
/** Default constructor. */ public Mutex() { init(new InternalLock()); }
/** Default constructor. */ public Mutex() { init(new InternalLock()); }
/** Default constructor. */ public Mutex() { init(new InternalLock()); this.wrapper = null; }
/** Default constructor. */ public Mutex() { this.LOCK = init(new InternalLock()); this.wrapper = null; }
/** @param privileged can enter privileged states of this Mutex * This helps avoid creating of custom Runnables. */ public Mutex(Privileged privileged) { if (privileged == null) { throw new IllegalArgumentException("privileged == null"); //NOI18N } else { init(new InternalLock()); privileged.setParent(this); } this.wrapper = null; }
/** @param privileged can enter privileged states of this Mutex * This helps avoid creating of custom Runnables. */ public Mutex(Privileged privileged) { if (privileged == null) { throw new IllegalArgumentException("privileged == null"); //NOI18N } else { init(new InternalLock()); privileged.setParent(this); } }
/** @param privileged can enter privileged states of this Mutex * This helps avoid creating of custom Runnables. */ public Mutex(Privileged privileged) { if (privileged == null) { throw new IllegalArgumentException("privileged == null"); //NOI18N } else { init(new InternalLock()); privileged.setParent(this); } }
/** @param privileged can enter privileged states of this Mutex * This helps avoid creating of custom Runnables. */ public Mutex(Privileged privileged) { if (privileged == null) { throw new IllegalArgumentException("privileged == null"); //NOI18N } else { this.LOCK = init(new InternalLock()); privileged.setParent(this); } this.wrapper = null; }