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.Constructor Summary
ConstructorsConstructorDescriptionConstructs a LockTableRequest object with default parameters.Constructs a LockTableRequest object with the specified parameters.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
public LockTableRequest()Constructs a LockTableRequest object with default parameters.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
getClassSchema
public static org.apache.avro.Schema getClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.Returns:The schema for the class.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.getSchema
public org.apache.avro.Schema getSchema()This method supports the Avro framework and is not intended to be called directly by the user.Specified by:getSchemain interfaceorg.apache.avro.generic.GenericContainerReturns:The schema object describing this class.get
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:getin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to getReturns:value of the field with the given index.Throws:put
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:putin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to setvalue- the value to setThrows: