Annotation Type NosqlTable
Optional annotation used to set options regarding the table used for entity.
If annotation is not explicitly used the TableLimits
are determined
by NosqlDbConfig.getDefaultCapacityMode()
,
NosqlDbConfig.getDefaultStorageGB()
,
NosqlDbConfig.getDefaultReadUnits()
, and
NosqlDbConfig.getDefaultWriteUnits()
.
-
Nested Class Summary
Nested Classes -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionboolean
Flag that indicates if automatic creation of table is enabled.Sets the capacity mode when table is created.Sets the default consistency for all read operations applied to this table.Sets the default durability for all write operations applied to this table.int
Sets the read units when table is created.int
Sets the storageGB when table is created.Sets the name of the table to be used for this entity.int
Sets the default timeout in milliseconds for all operations applied on this table.int
Sets the default table level Time to Live (TTL) when table is created.Sets the unit of TTL value.int
Sets the write units when table is created.
-
Element Details
-
tableName
String tableNameSets the name of the table to be used for this entity. If not set or set to "", theClass.getSimpleName()
is used.- Default:
- ""
-
autoCreateTable
boolean autoCreateTableFlag that indicates if automatic creation of table is enabled. By default this is set toConstants.DEFAULT_AUTO_CREATE_TABLE
.- Default:
- true
-
capacityMode
NosqlCapacityMode capacityModeSets the capacity mode when table is created. This applies only in cloud or cloud sim scenarios.For
TableLimits
to be set one of the following two conditions must be met:- capacityMode is set to PROVISIONED and all three: readUnits, writeUnits and storageGB must be greater than 0,
- or capacityMode is set to ON_DEMAND and storageGB must be greater than 0.
If not set the default value is
NosqlCapacityMode.PROVISIONED
.- Since:
- 1.3.0
- Default:
- PROVISIONED
-
readUnits
int readUnitsSets the read units when table is created. Valid values are only values greater than 0. This property applies only in cloud or cloud sim scenarios and capacity mode isNosqlCapacityMode.PROVISIONED
. If not set the valueNosqlDbConfig.getDefaultReadUnits()
is used. All three: readUnits, writeUnits and storageGB must be greater than 0 to set a validTableLimits
.- Default:
- -1
-
writeUnits
int writeUnitsSets the write units when table is created. Valid values are only values greater than 0. This applies only in cloud or cloud sim scenarios and capacity mode isNosqlCapacityMode.PROVISIONED
. If not set the valueNosqlDbConfig.getDefaultWriteUnits()
is used. All three: readUnits, writeUnits and storageGB must be greater than 0 to set a validTableLimits
.- Default:
- -1
-
storageGB
int storageGBSets the storageGB when table is created. This applies only in cloud or cloud sim scenarios.If not set, the value of
NosqlDbConfig.getDefaultStorageGB()
is used.A 0 or less than -1 value will force no table limits, but they are required in cloud and cloudsim instalations.
For
TableLimits
to be set one of the following two conditions must be met:- capacityMode is set to PROVISIONED and all three: readUnits, writeUnits and storageGB must be greater than 0,
- or capacityMode is set to ON_DEMAND and storageGB must be greater than 0.
- Default:
- -1
-
consistency
String consistencySets the default consistency for all read operations applied to this table. Valid values for this are defined inConsistency
. If not set the default value for this is EVENTUAL.- Default:
- "EVENTUAL"
-
durability
String durabilitySets the default durability for all write operations applied to this table. Valid values for this are defined inDurability
. If not set the default value for this is COMMIT_NO_SYNC.Note: This applies to On-Prem installations only.
- Default:
- "COMMIT_NO_SYNC"
-
timeout
int timeoutSets the default timeout in milliseconds for all operations applied on this table. If not set the default value is 0 which means it is ignored. Note:NosqlRepository.setTimeout(int)
take precedence over the set here.- Default:
- 0
-
ttl
int ttlSets the default table level Time to Live (TTL) when table is created. TTL allows automatic expiration of table rows when specified duration of time is elapsed. If not set the valueConstants.NOTSET_TABLE_TTL
is used, which means no table level TTL. This is applicable only whenautoCreateTable()
is set to true.- Since:
- 1.5.0
- See Also:
-
TimeToLive
- Using TTL
- Default:
- 0
-
ttlUnit
NosqlTable.TtlUnit ttlUnitSets the unit of TTL value. If not set the default value is days. This is applicable only whenautoCreateTable()
is set to true.- Since:
- 1.5.0
- See Also:
-
TimeToLive
- Using TTL
- Default:
- DAYS
-