public class CreateTriggerByRangeRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.createTriggerByRange(CreateTriggerByRangeRequest)
.
Sets up a simple range trigger for a column_name for one or more tables.
Once the trigger has been activated, any record added to the listed
tables(s) via GPUdb.insertRecordsRaw(RawInsertRecordsRequest)
with the chosen
column_name's value falling within the specified range will trip the
trigger. All such records will be queued at the trigger port (by default
'9001' but able to be retrieved via GPUdb.showSystemStatus(ShowSystemStatusRequest)
) for any
listening client to collect. Active triggers can be cancelled by using the
GPUdb.clearTrigger(ClearTriggerRequest)
endpoint or by
clearing all relevant tables.
The output returns the trigger handle as well as indicating success or failure of the trigger activation.
Constructor and Description |
---|
CreateTriggerByRangeRequest()
Constructs a CreateTriggerByRangeRequest object with default parameters.
|
CreateTriggerByRangeRequest(String requestId,
List<String> tableNames,
String columnName,
double min,
double max,
Map<String,String> options)
Constructs a CreateTriggerByRangeRequest 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 |
getColumnName() |
double |
getMax() |
double |
getMin() |
Map<String,String> |
getOptions() |
String |
getRequestId() |
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
List<String> |
getTableNames() |
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.
|
CreateTriggerByRangeRequest |
setColumnName(String columnName) |
CreateTriggerByRangeRequest |
setMax(double max) |
CreateTriggerByRangeRequest |
setMin(double min) |
CreateTriggerByRangeRequest |
setOptions(Map<String,String> options) |
CreateTriggerByRangeRequest |
setRequestId(String requestId) |
CreateTriggerByRangeRequest |
setTableNames(List<String> tableNames) |
String |
toString() |
public CreateTriggerByRangeRequest()
public CreateTriggerByRangeRequest(String requestId, List<String> tableNames, String columnName, double min, double max, Map<String,String> options)
requestId
- User-created ID for the trigger. The ID can be
alphanumeric, contain symbols, and must contain at
least one character.tableNames
- Tables on which the trigger will be active.columnName
- Name of a numeric column_name on which the trigger is
activated.min
- The lower bound (inclusive) for the trigger range.max
- The upper bound (inclusive) for the trigger range.options
- Optional parameters. The default value is an empty
Map
.public static org.apache.avro.Schema getClassSchema()
public String getRequestId()
public CreateTriggerByRangeRequest setRequestId(String requestId)
requestId
- User-created ID for the trigger. The ID can be
alphanumeric, contain symbols, and must contain at
least one character.this
to mimic the builder pattern.public List<String> getTableNames()
public CreateTriggerByRangeRequest setTableNames(List<String> tableNames)
tableNames
- Tables on which the trigger will be active.this
to mimic the builder pattern.public String getColumnName()
public CreateTriggerByRangeRequest setColumnName(String columnName)
columnName
- Name of a numeric column_name on which the trigger is
activated.this
to mimic the builder pattern.public double getMin()
public CreateTriggerByRangeRequest setMin(double min)
min
- The lower bound (inclusive) for the trigger range.this
to mimic the builder pattern.public double getMax()
public CreateTriggerByRangeRequest setMax(double max)
max
- The upper bound (inclusive) for the trigger range.this
to mimic the builder pattern.public Map<String,String> getOptions()
Map
.public CreateTriggerByRangeRequest 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.