28package com.jogamp.common.util.locks;
30import java.io.IOException;
32import org.junit.Assert;
33import org.junit.BeforeClass;
35import org.junit.FixMethodOrder;
36import org.junit.runners.MethodSorters;
38import com.jogamp.junit.util.JunitTracer;
39import com.jogamp.junit.util.SingletonJunitCase;
41@FixMethodOrder(MethodSorters.NAME_ASCENDING)
54 singletonInstance.
unlock();
57 public static void main(
final String args[])
throws IOException, InterruptedException {
59 org.junit.runner.JUnitCore.
main(tstname);
abstract String getName()
synchronized boolean tryLock(long maxwait)
Blocking until the lock is acquired by this Thread or maxwait in ms is reached.
static SingletonInstance createServerSocket(final long poll_ms, final int portNumber)
A user shall use ephemeral ports:
void unlock()
Release the lock.
static void main(final String args[])
static void oneTimeSetUp()
static final int SINGLE_INSTANCE_LOCK_PORT
static final long SINGLE_INSTANCE_LOCK_TO
static final long SINGLE_INSTANCE_LOCK_POLL