|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.dse.services.landp.DeviceStatus
This class encapsulates a device status (closed, open, reading or writing), so that its getter and setter are both synchronized. This way, there is no possibility of any conflict when the status is changed concurrently. For example, when a secondary thread is in charge of waiting for a LANDP read event and the user thread cancels the read request.
Field Summary | |
---|---|
static int |
CLOSED
|
static int |
OPEN
|
static int |
READING
|
static int |
WRITING
|
Constructor Summary | |
---|---|
(package private) |
DeviceStatus()
This constructor creates a DeviceStatus object. |
Method Summary | |
---|---|
int |
get()
Synchronized status getter. |
(package private) void |
set(int newStatus)
Synchronized status setter. |
java.lang.String |
toString()
Returns a string with a text representation of the status value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int CLOSED
public static final int OPEN
public static final int READING
public static final int WRITING
Constructor Detail |
DeviceStatus()
Method Detail |
public int get()
void set(int newStatus)
newStatus
- int - the new device status value.public java.lang.String toString()
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |