Package com.gpudb.protocol
Class LockTableRequest
java.lang.Object
com.gpudb.protocol.LockTableRequest
All Implemented Interfaces:
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecordA set of parameters for
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.
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA set of string constants for theLockTableRequestparameterlockType.Method Summary
Modifier and TypeMethodDescriptionbooleanget(int index) This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.The type of lock being applied to the table.Optional parameters.org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.Name of the table to be locked, in [schema_name.]table_name format, using standard name resolution rules.inthashCode()voidThis method supports the Avro framework and is not intended to be called directly by the user.setLockType(String lockType) The type of lock being applied to the table.setOptions(Map<String, String> options) Optional parameters.setTableName(String tableName) Name of the table to be locked, in [schema_name.]table_name format, using standard name resolution rules.toString()
Constructor Details
LockTableRequest
Constructs a LockTableRequest object with the specified parameters.Parameters: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 toSTATUSwill 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 emptyMap.
Method Details
getTableName
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.Returns:The current value oftableName.setTableName
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.Parameters:tableName- The new value fortableName.Returns:thisto mimic the builder pattern.getLockType
The type of lock being applied to the table. Setting it toSTATUSwill 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.Returns:The current value oflockType.setLockType
The type of lock being applied to the table. Setting it toSTATUSwill 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.Parameters:lockType- The new value forlockType.Returns:thisto mimic the builder pattern.setOptions
Optional parameters. The default value is an emptyMap.Parameters:options- The new value foroptions.Returns:thisto mimic the builder pattern.