TIBCO FTL®
Macros | Typedefs | Functions
tiblock.h File Reference

Cooperating application programs can use locks to implement exclusive access to a map within a persistence store. More...

Macros

#define TIBLOCK_PROPERTY_DOUBLE_LOCK_ACQUIRE_RETRY_DURATION   "com.tibco.ftl.lock.acquire.retry.duration"
 Retry duration for lock requests. double. More...
 

Typedefs

typedef struct __tibLockId * tibLock
 

Functions

TIB_API void tibLock_Destroy (tibEx e, tibLock lock)
 Destroy a local lock object and reclaim its resources. More...
 
TIB_API tibbool_t tibLock_Request (tibEx e, tibLock lock)
 No operation. More...
 
TIB_API void tibLock_Return (tibEx e, tibLock lock)
 Release a lock. More...
 
TIB_API void tibLock_Steal (tibEx e, tibLock lock)
 Forcibly acquire a lock, even if another process holds it. More...
 

Detailed Description

Cooperating application programs can use locks to implement exclusive access to a map within a persistence store.

To create a lock object, see tibRealm_CreateLock.

If a client process exits or disconnects from the persistence server, the library automatically releases all the locks that the process holds.

This file defines the calls that manipulate locks. In addition, map objects and map iterator objects have methods that operate while holding a lock.

Macro Definition Documentation

#define TIBLOCK_PROPERTY_DOUBLE_LOCK_ACQUIRE_RETRY_DURATION   "com.tibco.ftl.lock.acquire.retry.duration"

Retry duration for lock requests. double.

Supply this property to tibRealm_CreateLock.

This determines the number of seconds the client will attempt to acquire the lock. The client may retry if it can't access the persistence server, or wait if another client owns the lock. If the client does not already own the lock, the client attempts to acquire it when any map operation requiring a lock is called.

This value must be positive or zero.

Typedef Documentation

typedef struct __tibLockId* tibLock

Function Documentation

TIB_API void tibLock_Destroy ( tibEx  e,
tibLock  lock 
)

Destroy a local lock object and reclaim its resources.

If the process holds the lock, this call returns the lock before destroying the object.

Parameters
eThe exception object captures information about failures.
lockThe call destroys the local lock object.
Returns
void
TIB_API tibbool_t tibLock_Request ( tibEx  e,
tibLock  lock 
)

No operation.

In releases earlier than 5.0, this call requested a lock from its persistence store.

In Release 5.0 and later, this call is no longer necessary; it returns tibTrue without any other effect.

Calls that require a lock automatically request it; see:

Programs that correctly used earlier versions of lock calls continue to operate properly.

Parameters
eUnused.
lockUnused.
Returns
This call returns the boolean value tibTrue.
TIB_API void tibLock_Return ( tibEx  e,
tibLock  lock 
)

Release a lock.

If the process does not hold the lock, this call has no effect.

Parameters
eThe exception object captures information about failures.
lockThe call releases the lock represented by this lock object.
Returns
void
TIB_API void tibLock_Steal ( tibEx  e,
tibLock  lock 
)

Forcibly acquire a lock, even if another process holds it.

The library delays the effect of this call (stealing the lock) until the next time the process calls a map method that requires the lock.

Parameters
eThe exception object captures information about failures.
lockThe call steals the lock represented by this lock object.
Returns
void