public class LockTableRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.lockTable.
Manages global access to a table's data. By default a table has a lockType of READ_WRITE,
indicating all operations are permitted. A user may request a READ_ONLY or a WRITE_ONLY
lock, after which only read or write operations, respectively, are permitted
on the table until the lock is removed. When lockType is NO_ACCESS then no operations are
permitted on the table. The lock status can be queried by setting lockType to STATUS.
| Modifier and Type | Class and Description |
|---|---|
static class |
LockTableRequest.LockType
A set of string constants for the
LockTableRequest parameter
lockType. |
| Constructor and Description |
|---|
LockTableRequest()
Constructs a LockTableRequest object with default parameters.
|
LockTableRequest(String tableName,
String lockType,
Map<String,String> options)
Constructs a LockTableRequest object with the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Object |
get(int index)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
String |
getLockType()
The type of lock being applied to the table.
|
Map<String,String> |
getOptions()
Optional parameters.
|
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
String |
getTableName()
|
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
LockTableRequest |
setLockType(String lockType)
The type of lock being applied to the table.
|
LockTableRequest |
setOptions(Map<String,String> options)
Optional parameters.
|
LockTableRequest |
setTableName(String tableName)
|
public LockTableRequest()
public LockTableRequest(String tableName, String lockType, Map<String,String> options)
tableName - Name of the table to be locked, in
[schema_name.]table_name format, using standard name resolution rules. It must be a
currently existing table or view.lockType - The type of lock being applied to the table. Setting it
to STATUS will return the
current lock status of the table without changing it.
Supported values:
STATUS: Show locked
status
NO_ACCESS: Allow no
read/write operations
READ_ONLY: Allow
only read operations
WRITE_ONLY: Allow
only write operations
READ_WRITE: Allow
all read/write operations
STATUS.options - Optional parameters. The default value is an empty
Map.public static org.apache.avro.Schema getClassSchema()
public String getTableName()
tableName.public LockTableRequest setTableName(String tableName)
tableName - The new value for tableName.this to mimic the builder pattern.public String getLockType()
STATUS will return the current lock status of the table
without changing it.
Supported values:
STATUS: Show locked status
NO_ACCESS: Allow no read/write
operations
READ_ONLY: Allow only read operations
WRITE_ONLY: Allow only write
operations
READ_WRITE: Allow all read/write
operations
STATUS.lockType.public LockTableRequest setLockType(String lockType)
STATUS will return the current lock status of the table
without changing it.
Supported values:
STATUS: Show locked status
NO_ACCESS: Allow no read/write
operations
READ_ONLY: Allow only read operations
WRITE_ONLY: Allow only write
operations
READ_WRITE: Allow all read/write
operations
STATUS.lockType - The new value for lockType.this to mimic the builder pattern.public Map<String,String> getOptions()
Map.options.public LockTableRequest setOptions(Map<String,String> options)
Map.options - The new value for options.this to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema in interface org.apache.avro.generic.GenericContainerpublic Object get(int index)
get in interface org.apache.avro.generic.IndexedRecordindex - the position of the field to getIndexOutOfBoundsExceptionpublic void put(int index,
Object value)
put in interface org.apache.avro.generic.IndexedRecordindex - the position of the field to setvalue - the value to setIndexOutOfBoundsExceptionCopyright © 2025. All rights reserved.