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 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
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
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()
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
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
.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
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
.this
to mimic the builder pattern.public Map<String,String> getOptions()
Map
.public LockTableRequest setOptions(Map<String,String> options)
options
- Optional parameters. The default value is an empty
Map
.this
to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
public Object get(int index)
get
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to getIndexOutOfBoundsException
public void put(int index, Object value)
put
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to setvalue
- the value to setIndexOutOfBoundsException
Copyright © 2020. All rights reserved.