|
| final long | getPollPeriod () |
| |
| abstract String | getName () |
| |
| final String | toString () |
| |
| synchronized void | lock () throws RuntimeException |
| | Blocking until the lock is acquired by this Thread or TIMEOUT is reached. More...
|
| |
| synchronized boolean | tryLock (long maxwait) throws RuntimeException |
| | Blocking until the lock is acquired by this Thread or maxwait in ms is reached. More...
|
| |
| void | unlock () throws RuntimeException |
| | Release the lock. More...
|
| |
| synchronized boolean | isLocked () |
| | Query if locked. More...
|
| |
| void | lock () throws RuntimeException |
| | Blocking until the lock is acquired by this Thread or TIMEOUT is reached. More...
|
| |
| boolean | tryLock (long timeout) throws InterruptedException |
| | Blocking until the lock is acquired by this Thread or maxwait in ms is reached. More...
|
| |
| void | unlock () throws RuntimeException |
| | Release the lock. More...
|
| |
| boolean | isLocked () |
| | Query if locked. More...
|
| |
|
| static final boolean | DEBUG = true |
| |
Definition at line 36 of file SingletonInstance.java.
◆ SingletonInstance()
| com.jogamp.common.util.locks.SingletonInstance.SingletonInstance |
( |
final long |
poll_ms | ) |
|
|
protected |
◆ createFileLock() [1/2]
| static SingletonInstance com.jogamp.common.util.locks.SingletonInstance.createFileLock |
( |
final long |
poll_ms, |
|
|
final File |
lockFile |
|
) |
| |
|
static |
◆ createFileLock() [2/2]
| static SingletonInstance com.jogamp.common.util.locks.SingletonInstance.createFileLock |
( |
final long |
poll_ms, |
|
|
final String |
lockFileBasename |
|
) |
| |
|
static |
◆ createServerSocket()
| static SingletonInstance com.jogamp.common.util.locks.SingletonInstance.createServerSocket |
( |
final long |
poll_ms, |
|
|
final int |
portNumber |
|
) |
| |
|
static |
A user shall use ephemeral ports:
-
IANA suggests 49152 to 65535 as "dynamic and/or private ports".
-
Many GNU/Linux kernels use 32768 to 61000.
-
FreeBSD >= 4.6 uses the IANA port range.
-
FreeBSD < 4.6 and BSD use ports 1024 through 4999.
-
Microsoft Windows operating systems through Server 2003 use the range 1025 to 5000
-
Windows Vista, Windows 7, and Server 2008 use the IANA range.
- Parameters
-
| pollPeriod | |
| portNumber | to be used for this single instance server socket. |
Definition at line 61 of file SingletonInstance.java.
◆ getName()
| abstract String com.jogamp.common.util.locks.SingletonInstance.getName |
( |
| ) |
|
|
abstract |
◆ getPollPeriod()
| final long com.jogamp.common.util.locks.SingletonInstance.getPollPeriod |
( |
| ) |
|
◆ infoPrefix() [1/2]
| String com.jogamp.common.util.locks.SingletonInstance.infoPrefix |
( |
| ) |
|
|
protected |
◆ infoPrefix() [2/2]
| String com.jogamp.common.util.locks.SingletonInstance.infoPrefix |
( |
final long |
currentMillis | ) |
|
|
protected |
◆ isLocked()
| synchronized boolean com.jogamp.common.util.locks.SingletonInstance.isLocked |
( |
| ) |
|
◆ lock()
| synchronized void com.jogamp.common.util.locks.SingletonInstance.lock |
( |
| ) |
throws RuntimeException |
◆ toString()
| final String com.jogamp.common.util.locks.SingletonInstance.toString |
( |
| ) |
|
◆ tryLock()
| synchronized boolean com.jogamp.common.util.locks.SingletonInstance.tryLock |
( |
long |
timeout | ) |
throws RuntimeException |
Blocking until the lock is acquired by this Thread or maxwait in ms is reached.
- Parameters
-
| timeout | 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. |
- Returns
- true if the lock has been acquired within
maxwait, otherwise false
- Exceptions
-
Implements com.jogamp.common.util.locks.Lock.
Definition at line 88 of file SingletonInstance.java.
◆ tryLockImpl()
| abstract boolean com.jogamp.common.util.locks.SingletonInstance.tryLockImpl |
( |
| ) |
|
|
abstractprotected |
◆ unlock()
| void com.jogamp.common.util.locks.SingletonInstance.unlock |
( |
| ) |
throws RuntimeException |
◆ unlockImpl()
| abstract boolean com.jogamp.common.util.locks.SingletonInstance.unlockImpl |
( |
| ) |
|
|
abstractprotected |
◆ DEBUG
| final boolean com.jogamp.common.util.locks.SingletonInstance.DEBUG = true |
|
staticprotected |
The documentation for this class was generated from the following file: