| Modifier and Type | Field and Description |
|---|---|
| protected static final boolean | |
| private boolean | |
| private final long |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static SingletonInstance | |
| public static SingletonInstance | |
| public static SingletonInstance | createServerSocket(final long poll_ms, final int
to be used for this single instance server socket. portNumber)A user shall use ephemeral ports:
|
| public abstract String | |
| public final long | |
| protected String | |
| protected String | |
| public synchronized boolean | |
| public synchronized void | lock()
Implements com. TIMEOUT is reached.
|
| public final String | |
| public synchronized boolean | tryLock(long
Maximum time in ms to wait to acquire the lock. If this value is zero,
the call returns immediately either without being able
to acquire the lock, or with acquiring the lock directly while ignoring any scheduling order. maxwait)Implements com. maxwait in ms is reached.
|
| protected abstract boolean | |
| public void | |
| protected abstract boolean |
| DEBUG | back to summary |
|---|---|
| protected static final boolean DEBUG | |
| locked | back to summary |
|---|---|
| private boolean locked | |
| poll_ms | back to summary |
|---|---|
| private final long poll_ms | |
| SingletonInstance | back to summary |
|---|---|
| protected SingletonInstance(final long poll_ms) | |
| createFileLock | back to summary |
|---|---|
| public static SingletonInstance createFileLock(final long poll_ms, final String lockFileBasename) | |
| createFileLock | back to summary |
|---|---|
| public static SingletonInstance createFileLock(final long poll_ms, final File lockFile) | |
| createServerSocket | back to summary |
|---|---|
| public static SingletonInstance createServerSocket(final long poll_ms, final int portNumber) A user shall use ephemeral ports:
| |
| getName | back to summary |
|---|---|
| public abstract String getName() | |
| getPollPeriod | back to summary |
|---|---|
| public final long getPollPeriod() | |
| infoPrefix | back to summary |
|---|---|
| protected String infoPrefix(final long currentMillis) | |
| infoPrefix | back to summary |
|---|---|
| protected String infoPrefix() | |
| isLocked | back to summary |
|---|---|
| public synchronized boolean isLocked() Implements com. Doc from com. Query if locked
| |
| lock | back to summary |
|---|---|
| public synchronized void lock() throws RuntimeException Implements com. Doc from com. Blocking until the lock is acquired by this Thread or
| |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| tryLock | back to summary |
|---|---|
| public synchronized boolean tryLock(long maxwait) throws RuntimeException Implements com. Doc from com. Blocking until the lock is acquired by this Thread or
| |
| tryLockImpl | back to summary |
|---|---|
| protected abstract boolean tryLockImpl() | |
| unlock | back to summary |
|---|---|
| public void unlock() throws RuntimeException Implements com. Doc from com. Release the lock.
| |
| unlockImpl | back to summary |
|---|---|
| protected abstract boolean unlockImpl() | |