Transaction System API

LockManager

Provides a locking mechanism.

Method Summary
boolean createLock(String objectKey, String sessionKey, Date expires)

Sets a self expiring lock for the given key. The lock will expire as of the date/time indicated. Maximum lock time is 1 hour.

  deleteLock(String objectKey)

Deletes the specified lock

Date getExpire(String objectKey, String sessionKey)

Returns the expiration, if any, for the specified objectKey. If sessionKey is provided, this returns the expire datetime only if the sessionKey has the lock.

String getSessionKey(String objectKey)

Returns the session key, if any, for the specified objectKey.

boolean hasLock(String objectKey, String sessionKey)

Returns true if the specified sessionKey has a lock on the objectKey. If sessionKey is provided, this returns the expire datetime only if the sessionKey has the lock.

String toString()

Returns a description of this object.

Method Detail


boolean createLock(String objectKey, String sessionKey, Date expires)

Sets a self expiring lock for the given key. The lock will expire as of the date/time indicated. Maximum lock time is 1 hour.

Parameters:

  • String   objectKey Required parameter. Maximum allowed size of parameter: 128
  • String   sessionKey Required parameter. Maximum allowed size of parameter: 128
  • Date   expires Required parameter.

Returns:  boolean

Since: 11-10-2015

top

deleteLock(String objectKey)

Deletes the specified lock

Parameters:

  • String   objectKey Required parameter. Maximum allowed size of parameter: 128

Since: 11-10-2015

top

Date getExpire(String objectKey, String sessionKey)

Returns the expiration, if any, for the specified objectKey. If sessionKey is provided, this returns the expire datetime only if the sessionKey has the lock.

Parameters:

  • String   objectKey Required parameter. Maximum allowed size of parameter: 128
  • String   sessionKey Maximum allowed size of parameter: 128

Returns:  Date

Since: 11-10-2015

top

String getSessionKey(String objectKey)

Returns the session key, if any, for the specified objectKey.

Parameters:

  • String   objectKey Required parameter. Maximum allowed size of parameter: 128

Returns:  String

Since: 11-10-2015

top

boolean hasLock(String objectKey, String sessionKey)

Returns true if the specified sessionKey has a lock on the objectKey. If sessionKey is provided, this returns the expire datetime only if the sessionKey has the lock.

Parameters:

  • String   objectKey Required parameter. Maximum allowed size of parameter: 128
  • String   sessionKey Maximum allowed size of parameter: 128

Returns:  boolean

Since: 11-10-2015

top

String toString()

Returns a description of this object.

Returns:  String

Since: 11-10-2015

top
Copyright © 2006 - 2024, ContractPal, Inc. All rights reserved. API Date: May 01, 2024 05:15 AM