Package com.influxdb.v3.client.write
Class WriteParameters
java.lang.Object
com.influxdb.v3.client.write.WriteParameters
Write API parameters.
Supports to specify:
database
- specifies the database to be used for InfluxDB operationsorganization
- specifies the organization to be used for InfluxDB operationsprecision
- specified the precision to use for the timestamp of points
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final WritePrecision
Default WritePrecision.static final WriteParameters
Default WriteParameters. -
Constructor Summary
ConstructorsConstructorDescriptionWriteParameters
(String database, String organization, WritePrecision precision) Construct WriteAPI parameters. -
Method Summary
Modifier and TypeMethodDescriptioncopy
(WritePrecision precision, InfluxDBClientConfigs configs) Copy current parameters with new precision.databaseSafe
(InfluxDBClientConfigs configs) boolean
int
hashCode()
organizationSafe
(InfluxDBClientConfigs configs) precisionSafe
(InfluxDBClientConfigs configs)
-
Field Details
-
DEFAULT_WRITE_PRECISION
Default WritePrecision. -
DEFAULTS
Default WriteParameters.
-
-
Constructor Details
-
WriteParameters
public WriteParameters(@Nullable String database, @Nullable String organization, @Nullable WritePrecision precision) Construct WriteAPI parameters.- Parameters:
database
- The database to be used for InfluxDB operations. If it is not specified then useInfluxDBClientConfigs.getDatabase()
.organization
- The organization to be used for InfluxDB operations. If it is not specified then useInfluxDBClientConfigs.getOrganization()
.precision
- The precision to use for the timestamp of points. If it is not specified then useWritePrecision.NS
.
-
-
Method Details
-
organizationSafe
- Parameters:
configs
- with default value- Returns:
- The destination organization for writes.
-
databaseSafe
- Parameters:
configs
- with default value- Returns:
- The destination database for writes.
-
precisionSafe
- Parameters:
configs
- with default value- Returns:
- Precision for unix timestamps in the line protocol of the request payload.
-
copy
@Nonnull public WriteParameters copy(@Nonnull WritePrecision precision, @Nonnull InfluxDBClientConfigs configs) Copy current parameters with new precision.- Parameters:
precision
- new precisionconfigs
- default values- Returns:
- copied parameters
-
equals
-
hashCode
public int hashCode()
-