org.garret.jipc
Interface JIPCSemaphore

All Superinterfaces:
JIPCPrimitive

public interface JIPCSemaphore
extends JIPCPrimitive

Classical sempahore with standard set of operations.

Semantic of methods inherited from JIPCPrimitive:

waitFor
Wait until sempahore counter becomes greater than zero whereupon counter is decremented by 1
reset
Reset counter to zero


Field Summary
 
Fields inherited from interface org.garret.jipc.JIPCPrimitive
DEFAULT_RANK
 
Method Summary
 void signal()
          Increment semaphore counter by 1.
 void signal(int count)
          Add count to sempahore counter.
 
Methods inherited from interface org.garret.jipc.JIPCPrimitive
alreadyExists, close, getName, priorityWait, priorityWait, reset, waitFor, waitFor
 

Method Detail

signal

public void signal()
            throws JIPCException,
                   java.io.IOException
Increment semaphore counter by 1. If there are blocked session one of them is awaken, decrements counter and proceed.

JIPCException
java.io.IOException

signal

public void signal(int count)
            throws JIPCException,
                   java.io.IOException
Add count to sempahore counter. This method is equivalent to count invocations of signal() method.

Parameters:
count - positive value to be added to the semaphore counter
JIPCException
java.io.IOException