Package com.gpudb.protocol
Class CreateTriggerByRangeRequest
- java.lang.Object
-
- com.gpudb.protocol.CreateTriggerByRangeRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class CreateTriggerByRangeRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.createTriggerByRange.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.insertRecordswith 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 viaGPUdb.showSystemStatus) for any listening client to collect. Active triggers can be cancelled by using theGPUdb.clearTriggerendpoint or by clearing all relevant tables.The output returns the trigger handle as well as indicating success or failure of the trigger activation.
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.StringgetColumnName()Name of a numeric column_name on which the trigger is activated.doublegetMax()The upper bound (inclusive) for the trigger range.doublegetMin()The lower bound (inclusive) for the trigger range.Map<String,String>getOptions()Optional parameters.StringgetRequestId()User-created ID for the trigger.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.List<String>getTableNames()Tables on which the trigger will be active, each in [schema_name.]table_name format, using standard name resolution rules.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.CreateTriggerByRangeRequestsetColumnName(String columnName)Name of a numeric column_name on which the trigger is activated.CreateTriggerByRangeRequestsetMax(double max)The upper bound (inclusive) for the trigger range.CreateTriggerByRangeRequestsetMin(double min)The lower bound (inclusive) for the trigger range.CreateTriggerByRangeRequestsetOptions(Map<String,String> options)Optional parameters.CreateTriggerByRangeRequestsetRequestId(String requestId)User-created ID for the trigger.CreateTriggerByRangeRequestsetTableNames(List<String> tableNames)Tables on which the trigger will be active, each in [schema_name.]table_name format, using standard name resolution rules.StringtoString()
-
-
-
Constructor Detail
-
CreateTriggerByRangeRequest
public CreateTriggerByRangeRequest()
Constructs a CreateTriggerByRangeRequest object with default parameters.
-
CreateTriggerByRangeRequest
public CreateTriggerByRangeRequest(String requestId, List<String> tableNames, String columnName, double min, double max, Map<String,String> options)
Constructs a CreateTriggerByRangeRequest object with the specified parameters.- Parameters:
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, each in [schema_name.]table_name format, using standard name resolution rules.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 emptyMap.
-
-
Method Detail
-
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.
-
getRequestId
public String getRequestId()
User-created ID for the trigger. The ID can be alphanumeric, contain symbols, and must contain at least one character.- Returns:
- The current value of
requestId.
-
setRequestId
public CreateTriggerByRangeRequest setRequestId(String requestId)
User-created ID for the trigger. The ID can be alphanumeric, contain symbols, and must contain at least one character.- Parameters:
requestId- The new value forrequestId.- Returns:
thisto mimic the builder pattern.
-
getTableNames
public List<String> getTableNames()
Tables on which the trigger will be active, each in [schema_name.]table_name format, using standard name resolution rules.- Returns:
- The current value of
tableNames.
-
setTableNames
public CreateTriggerByRangeRequest setTableNames(List<String> tableNames)
Tables on which the trigger will be active, each in [schema_name.]table_name format, using standard name resolution rules.- Parameters:
tableNames- The new value fortableNames.- Returns:
thisto mimic the builder pattern.
-
getColumnName
public String getColumnName()
Name of a numeric column_name on which the trigger is activated.- Returns:
- The current value of
columnName.
-
setColumnName
public CreateTriggerByRangeRequest setColumnName(String columnName)
Name of a numeric column_name on which the trigger is activated.- Parameters:
columnName- The new value forcolumnName.- Returns:
thisto mimic the builder pattern.
-
getMin
public double getMin()
The lower bound (inclusive) for the trigger range.- Returns:
- The current value of
min.
-
setMin
public CreateTriggerByRangeRequest setMin(double min)
The lower bound (inclusive) for the trigger range.- Parameters:
min- The new value formin.- Returns:
thisto mimic the builder pattern.
-
getMax
public double getMax()
The upper bound (inclusive) for the trigger range.- Returns:
- The current value of
max.
-
setMax
public CreateTriggerByRangeRequest setMax(double max)
The upper bound (inclusive) for the trigger range.- Parameters:
max- The new value formax.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> getOptions()
Optional parameters. The default value is an emptyMap.- Returns:
- The current value of
options.
-
setOptions
public CreateTriggerByRangeRequest setOptions(Map<String,String> options)
Optional parameters. The default value is an emptyMap.- Parameters:
options- The new value foroptions.- 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.GenericContainer- Returns:
- The schema object describing this class.
-
get
public Object get(int index)
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to get- Returns:
- value of the field with the given index.
- Throws:
IndexOutOfBoundsException
-
put
public void put(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-