- TIBCO BusinessEvents®
- Standard
- Cluster
- DataGrid

# Cluster.DataGrid.Lock()

## Signature

`boolean Lock(String key, long timeout, boolean localOnly)`

## Domain

ACTION

## Description

Locks the object within a rule session. This call will wait for `timeout`. The `timeout` value of zero indicates wait indefinitely

## Parameters

Name | Type | Description
--- | --- | ---
`key` | `String` | A key that uniquely identifies a lock.
`timeout` | `long` | Specify in milliseconds the time to wait for the lock.
`localOnly` | `boolean` | true if the lock is local to the local session, false if the lock is cluster wide

## Returns

Type | Description
--- | ---
`boolean` |

## Cautions

none