Class CreateTriggerByAreaRequest
- java.lang.Object
-
- com.gpudb.protocol.CreateTriggerByAreaRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class CreateTriggerByAreaRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.createTriggerByArea.Sets up an area trigger mechanism for two column_names for one or more tables. (This function is essentially the two-dimensional version of
GPUdb.createTriggerByRange.) Once the trigger has been activated, any record added to the listed tables(s) viaGPUdb.insertRecordswith the chosen columns' values falling within the specified region 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 CreateTriggerByAreaRequest()Constructs a CreateTriggerByAreaRequest object with default parameters.CreateTriggerByAreaRequest(String requestId, List<String> tableNames, String xColumnName, List<Double> xVector, String yColumnName, List<Double> yVector, Map<String,String> options)Constructs a CreateTriggerByAreaRequest 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.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()Names of the tables on which the trigger will be activated and maintained, each in [schema_name.]table_name format, using standard name resolution rules.StringgetXColumnName()Name of a numeric column on which the trigger is activated.List<Double>getXVector()The respective coordinate values for the region on which the trigger is activated.StringgetYColumnName()Name of a second numeric column on which the trigger is activated.List<Double>getYVector()The respective coordinate values for the region on which the trigger is activated.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.CreateTriggerByAreaRequestsetOptions(Map<String,String> options)Optional parameters.CreateTriggerByAreaRequestsetRequestId(String requestId)User-created ID for the trigger.CreateTriggerByAreaRequestsetTableNames(List<String> tableNames)Names of the tables on which the trigger will be activated and maintained, each in [schema_name.]table_name format, using standard name resolution rules.CreateTriggerByAreaRequestsetXColumnName(String xColumnName)Name of a numeric column on which the trigger is activated.CreateTriggerByAreaRequestsetXVector(List<Double> xVector)The respective coordinate values for the region on which the trigger is activated.CreateTriggerByAreaRequestsetYColumnName(String yColumnName)Name of a second numeric column on which the trigger is activated.CreateTriggerByAreaRequestsetYVector(List<Double> yVector)The respective coordinate values for the region on which the trigger is activated.StringtoString()
-
-
-
Constructor Detail
-
CreateTriggerByAreaRequest
public CreateTriggerByAreaRequest()
Constructs a CreateTriggerByAreaRequest object with default parameters.
-
CreateTriggerByAreaRequest
public CreateTriggerByAreaRequest(String requestId, List<String> tableNames, String xColumnName, List<Double> xVector, String yColumnName, List<Double> yVector, Map<String,String> options)
Constructs a CreateTriggerByAreaRequest 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- Names of the tables on which the trigger will be activated and maintained, each in [schema_name.]table_name format, using standard name resolution rules.xColumnName- Name of a numeric column on which the trigger is activated. Usually 'x' for geospatial data points.xVector- The respective coordinate values for the region on which the trigger is activated. This usually translates to the x-coordinates of a geospatial region.yColumnName- Name of a second numeric column on which the trigger is activated. Usually 'y' for geospatial data points.yVector- The respective coordinate values for the region on which the trigger is activated. This usually translates to the y-coordinates of a geospatial region. Must be the same length as xvals.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 CreateTriggerByAreaRequest 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()
Names of the tables on which the trigger will be activated and maintained, each in [schema_name.]table_name format, using standard name resolution rules.- Returns:
- The current value of
tableNames.
-
setTableNames
public CreateTriggerByAreaRequest setTableNames(List<String> tableNames)
Names of the tables on which the trigger will be activated and maintained, each in [schema_name.]table_name format, using standard name resolution rules.- Parameters:
tableNames- The new value fortableNames.- Returns:
thisto mimic the builder pattern.
-
getXColumnName
public String getXColumnName()
Name of a numeric column on which the trigger is activated. Usually 'x' for geospatial data points.- Returns:
- The current value of
xColumnName.
-
setXColumnName
public CreateTriggerByAreaRequest setXColumnName(String xColumnName)
Name of a numeric column on which the trigger is activated. Usually 'x' for geospatial data points.- Parameters:
xColumnName- The new value forxColumnName.- Returns:
thisto mimic the builder pattern.
-
getXVector
public List<Double> getXVector()
The respective coordinate values for the region on which the trigger is activated. This usually translates to the x-coordinates of a geospatial region.- Returns:
- The current value of
xVector.
-
setXVector
public CreateTriggerByAreaRequest setXVector(List<Double> xVector)
The respective coordinate values for the region on which the trigger is activated. This usually translates to the x-coordinates of a geospatial region.- Parameters:
xVector- The new value forxVector.- Returns:
thisto mimic the builder pattern.
-
getYColumnName
public String getYColumnName()
Name of a second numeric column on which the trigger is activated. Usually 'y' for geospatial data points.- Returns:
- The current value of
yColumnName.
-
setYColumnName
public CreateTriggerByAreaRequest setYColumnName(String yColumnName)
Name of a second numeric column on which the trigger is activated. Usually 'y' for geospatial data points.- Parameters:
yColumnName- The new value foryColumnName.- Returns:
thisto mimic the builder pattern.
-
getYVector
public List<Double> getYVector()
The respective coordinate values for the region on which the trigger is activated. This usually translates to the y-coordinates of a geospatial region. Must be the same length as xvals.- Returns:
- The current value of
yVector.
-
setYVector
public CreateTriggerByAreaRequest setYVector(List<Double> yVector)
The respective coordinate values for the region on which the trigger is activated. This usually translates to the y-coordinates of a geospatial region. Must be the same length as xvals.- Parameters:
yVector- The new value foryVector.- 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 CreateTriggerByAreaRequest 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
-
-