public class LockTableRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.lockTable(LockTableRequest).
Manages global access to a table's data. By default a table has a lockType of unlock, 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 disable
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
The type of lock being applied to the table.
|
| 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() |
Map<String,String> |
getOptions() |
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
String |
getTableName() |
int |
hashCode() |
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) |
LockTableRequest |
setOptions(Map<String,String> options) |
LockTableRequest |
setTableName(String tableName) |
String |
toString() |
public LockTableRequest()
public LockTableRequest(String tableName, String lockType, Map<String,String> options)
tableName - Name of the table to be locked. It must be a currently
existing table, collection, 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
DISABLE: Allow no read/write operations
READ_ONLY: Allow only read operations
WRITE_ONLY: Allow only write operations
UNLOCK: Allow all read/write operations
STATUS.options - Optional parameters.public static org.apache.avro.Schema getClassSchema()
public String getTableName()
public LockTableRequest setTableName(String tableName)
tableName - Name of the table to be locked. It must be a currently
existing table, collection, or view.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
DISABLE:
Allow no read/write operations
READ_ONLY: Allow only read operations
WRITE_ONLY: Allow only write operations
UNLOCK:
Allow all read/write operations
STATUS.public LockTableRequest setLockType(String lockType)
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
DISABLE: Allow no read/write operations
READ_ONLY: Allow only read operations
WRITE_ONLY: Allow only write operations
UNLOCK: Allow all read/write operations
STATUS.this to mimic the builder pattern.public LockTableRequest setOptions(Map<String,String> options)
options - Optional parameters.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 © 2017. All rights reserved.