Public Member Functions | Private Attributes | Static Private Attributes
javax.jmdns.impl.DNSStatefulObject.DNSStatefulObjectSemaphore Class Reference

List of all members.

Public Member Functions

 DNSStatefulObjectSemaphore (String name)
void signalEvent ()
String toString ()
void waitForEvent (long timeout)

Private Attributes

final String _name
final ConcurrentMap< Thread,
Semaphore > 
_semaphores

Static Private Attributes

static Logger logger = Logger.getLogger(DNSStatefulObjectSemaphore.class.getName())

Detailed Description

This class define a semaphore. On this multiple threads can wait the arrival of one event. Thread wait for a maximum defined by the timeout.

Implementation note: this class is based on java.util.concurrent.Semaphore so that they can be released by the timeout timer.

Author:
Pierre Frisch

Definition at line 32 of file DNSStatefulObject.java.


Constructor & Destructor Documentation

Parameters:
nameSemaphore name for debugging purposes.

Definition at line 43 of file DNSStatefulObject.java.


Member Function Documentation

Signals the semaphore when the event arrives.

Definition at line 74 of file DNSStatefulObject.java.

Definition at line 83 of file DNSStatefulObject.java.

Blocks the current thread until the event arrives or the timeout expires.

Parameters:
timeoutwait period for the event

Definition at line 55 of file DNSStatefulObject.java.


Member Data Documentation

Definition at line 35 of file DNSStatefulObject.java.

final ConcurrentMap<Thread, Semaphore> javax.jmdns.impl.DNSStatefulObject.DNSStatefulObjectSemaphore._semaphores [private]

Definition at line 37 of file DNSStatefulObject.java.

Definition at line 33 of file DNSStatefulObject.java.


The documentation for this class was generated from the following file:


zeroconf_jmdns_suite
Author(s): Daniel Stonier
autogenerated on Thu Aug 27 2015 15:50:27