public class AddressResource extends SynchronizationResource
This class provides the implementation of synchronization based on the address of a data area.
This class is intended for cases where integration with an existing application that uses an address to ENQ. New applications should use the NameResource class.
As Java does not expose the address of a variable, it is used explicitly as an array of bytes.
com.ibm.cics.server.API
for general restrictions on using the JCICS API.
,
Serialized FormConstructor and Description |
---|
AddressResource()
Construct a default AddressResource.
|
Modifier and Type | Method and Description |
---|---|
void |
dequeue()
Unlock the resource
|
void |
enqueue()
Attempt to lock the resource.
|
byte[] |
getAddress()
Return the address used for the synchronization resource.
|
void |
setAddress(byte[] address)
Sets the synchronization address.
|
void |
tryEnqueue()
Attempt to lock the resource without suspending.
|
getDescription, setDescription
getCICSServerApiVersion
public AddressResource()
public void dequeue() throws LengthErrorException
LengthErrorException
- thrown by dequeue(address)public void enqueue() throws ResourceUnavailableException, LengthErrorException
ResourceUnavailableException
- the resource is in use by another
taskLengthErrorException
- thrown if found on super.enqueue(address, true);public byte[] getAddress()
public void setAddress(byte[] address)
address
- the synchronization addresspublic void tryEnqueue() throws ResourceUnavailableException, LengthErrorException
ResourceUnavailableException
- the resource is in use by another
taskLengthErrorException
- returned by super.enqueue(address, false);