Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- addColumn(String, String, String) - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
-
The statement that adds a column to an existing table, for
options.initSchemaon tables created by an earlier 5.0 pre-release (cosid_namespace.slot_offsetcame after 5.0.0-alpha.1). - addMissingIndex(Connection, JdbcDialect, JdbcTables) - Static method in class me.ahoo.cosid.store.jdbc.JdbcStore
-
Adds the slot table's index on
(namespace, last_owner_key)(R1-jdbc-01) when the table lacks it, as a table of 5.0.0-alpha.1 does;initSchemaruns it, and so does the migration tool on its target. - available(ClassLoader) - Static method in class me.ahoo.cosid.store.jdbc.JdbcDialects
-
The dialects to choose from: those registered with
ServiceLoaderfirst, then the built-in ones.
C
- checkKey(String, String) - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
-
Rejects a key the database could not keep apart from another one.
- close() - Method in class me.ahoo.cosid.store.jdbc.JdbcStore
- connection() - Method in class me.ahoo.cosid.store.jdbc.JdbcSession
-
The connection; in auto-commit mode outside
JdbcSession.transaction(me.ahoo.cosid.store.jdbc.JdbcSession.SqlWork<T>). - createIndex(String, String, List<String>) - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
-
The statement that creates an index, for
options.initSchemaon a table that lacks it (cosid_slot's index on(namespace, last_owner_key)came after 5.0.0-alpha.1).
D
- DEFAULT - Static variable in record class me.ahoo.cosid.store.jdbc.JdbcTables
-
The default names:
cosid_range,cosid_slot,cosid_namespace. - detect(Connection, ClassLoader) - Static method in class me.ahoo.cosid.store.jdbc.JdbcDialects
-
The first of
JdbcDialects.available(java.lang.ClassLoader)that supports the database of the connection. - dialect() - Method in class me.ahoo.cosid.store.jdbc.JdbcStore
-
The dialect of the database.
E
- equals(Object) - Method in record class me.ahoo.cosid.store.jdbc.JdbcTables
-
Indicates whether some other object is "equal to" this one.
F
- FetchPlan - Enum Class in me.ahoo.cosid.store.jdbc
-
How a JDBC store learns the
next_valuea reserve wrote (options.fetchPlan, R1-jdbc-06; 4.xfetch-plan). - firstRows(String, String, String, String, int) - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
-
Selects the first
rowsrows oforderBythat matchwhere, without locking them (limit; SQL Servertop).
H
- H2 - Static variable in class me.ahoo.cosid.store.jdbc.JdbcDialects
-
H2 2.x, for development and tests.
- hashCode() - Method in record class me.ahoo.cosid.store.jdbc.JdbcTables
-
Returns a hash code value for this object.
I
- initSchema() - Method in class me.ahoo.cosid.store.jdbc.JdbcStore
-
Creates the tables that do not exist (
options.initSchema); existing tables are left as they are, except that acosid_namespaceof 5.0.0-alpha.1 gets theslot_offsetcolumn it lacks (JdbcDialect.addColumn(java.lang.String, java.lang.String, java.lang.String); its rows read 0, the column default). - insertNamespaceIfAbsent(JdbcSession, String, int, long, int) - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
-
Records the parameters of a namespace on its first use; a namespace that exists is left as it is.
- isDuplicateKey(SQLException) - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
-
Whether a failure is a duplicate key, as two concurrent inserts of one key give.
- isRetryable(SQLException) - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
-
Whether a failed statement may simply run again: a deadlock victim or a serialization failure.
- isTimeout(SQLException) - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
-
Whether a failure is the statement running out of the query timeout (
StoreConfig.timeout); the store then fails withStoreTimeoutException.
J
- JdbcDialect - Interface in me.ahoo.cosid.store.jdbc
-
The SQL of one database product (06-stores.md §2.1), replacing the custom SQL settings of 4.x.
- JdbcDialects - Class in me.ahoo.cosid.store.jdbc
-
The built-in
JdbcDialects (06-stores.md §2.1) and the detection of the dialect of a database. - JdbcSession - Class in me.ahoo.cosid.store.jdbc
-
One borrowed connection of a JDBC store, as a
JdbcDialectsees it: the connection in auto-commit mode, the table names, and statements that carry the store timeout (StoreConfig.timeoutasqueryTimeout). - JdbcSession.SqlWork<T> - Interface in me.ahoo.cosid.store.jdbc
-
Work on the connection of a session.
- JdbcStore - Class in me.ahoo.cosid.store.jdbc
-
The JDBC store (06-stores.md §2.1): ranges and slot leases over a
DataSource, which should be pooled. - JdbcStore(DataSource, JdbcDialect, JdbcTables, Duration) - Constructor for class me.ahoo.cosid.store.jdbc.JdbcStore
-
A store on a database of the given dialect.
- JdbcStore(DataSource, JdbcDialect, JdbcTables, Duration, FetchPlan) - Constructor for class me.ahoo.cosid.store.jdbc.JdbcStore
-
A store on a database of the given dialect, reserving ranges with the given plan.
- JdbcStoreException - Exception Class in me.ahoo.cosid.store.jdbc
-
A JDBC store operation failed in the database or the driver; the cause is the
SQLException. - JdbcStoreException(String, SQLException) - Constructor for exception class me.ahoo.cosid.store.jdbc.JdbcStoreException
- JdbcStoreProvider - Class in me.ahoo.cosid.store.jdbc
- JdbcStoreProvider() - Constructor for class me.ahoo.cosid.store.jdbc.JdbcStoreProvider
- JdbcTables - Record Class in me.ahoo.cosid.store.jdbc
-
The table names of a JDBC store (06-stores.md §2.1):
options.rangeTable,slotTableandnamespaceTable. - JdbcTables(String, String, String) - Constructor for record class me.ahoo.cosid.store.jdbc.JdbcTables
-
Creates an instance of a
JdbcTablesrecord class.
L
- lastOwnerIndex() - Method in record class me.ahoo.cosid.store.jdbc.JdbcTables
-
The name of the slot table's index on
(namespace, last_owner_key): the unqualified slot table name with_last_owner_key, so that two stores with their own slot tables in one schema have their own indexes.
M
- MARIADB - Static variable in class me.ahoo.cosid.store.jdbc.JdbcDialects
-
MariaDB 10.11 LTS and later.
- me.ahoo.cosid.store.jdbc - package me.ahoo.cosid.store.jdbc
- MYSQL - Static variable in class me.ahoo.cosid.store.jdbc.JdbcDialects
-
MySQL 8.4 LTS and later.
N
- name() - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
-
The dialect name, for
options.dialectand messages. - named(String, ClassLoader) - Static method in class me.ahoo.cosid.store.jdbc.JdbcDialects
-
The dialect of the given name among
JdbcDialects.available(java.lang.ClassLoader), ignoring case. - namespace() - Method in record class me.ahoo.cosid.store.jdbc.JdbcTables
-
Returns the value of the
namespacerecord component. - nowMillis() - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
-
The store clock as an SQL expression: UTC epoch milliseconds as a
bigint, unaffected by the session time zone and daylight saving time.
O
- of(Object) - Static method in enum class me.ahoo.cosid.store.jdbc.FetchPlan
-
The plan an option names, ignoring case and
-/_. - of(Map<String, Object>) - Static method in record class me.ahoo.cosid.store.jdbc.JdbcTables
-
The table names given by store options, the defaults for those not given.
- of(DataSource, Duration) - Static method in class me.ahoo.cosid.store.jdbc.JdbcStore
-
A store on the default tables, with the dialect detected from the database (
JdbcDialects.detect(java.sql.Connection, java.lang.ClassLoader)). - open(StoreConfig) - Method in class me.ahoo.cosid.store.jdbc.JdbcStoreProvider
- options() - Method in class me.ahoo.cosid.store.jdbc.JdbcStoreProvider
P
- POSTGRESQL - Static variable in class me.ahoo.cosid.store.jdbc.JdbcDialects
-
PostgreSQL 15 and later.
- prepare(String) - Method in class me.ahoo.cosid.store.jdbc.JdbcSession
-
Prepares a statement with the store timeout.
- prepare(String, int) - Method in class me.ahoo.cosid.store.jdbc.JdbcSession
-
Prepares a statement with the store timeout that reports generated keys.
- provisionSlots(JdbcSession, String, int) - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
-
Creates the rows of slots
[0, limit)of a namespace that do not exist yet, with the column defaults; existing rows are left as they are.
R
- range() - Method in record class me.ahoo.cosid.store.jdbc.JdbcTables
-
Returns the value of the
rangerecord component. - ranges() - Method in class me.ahoo.cosid.store.jdbc.JdbcStore
- rename(String) - Method in record class me.ahoo.cosid.store.jdbc.JdbcTables
-
Rewrites SQL written for the default names (such as a
schema-*.sqlresource) to these names. - reserve(JdbcSession, String, long, long) - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
-
Reserves
sizevalues ofkeyin one round trip where the database allows it: a key that does not exist is created withnext_value = initialOffset + size; an existing key that is not sealed and hasnext_value <= Long.MAX_VALUE - sizegetsnext_value + size. - run() - Method in interface me.ahoo.cosid.store.jdbc.JdbcSession.SqlWork
S
- schema(JdbcTables) - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
-
The statements that create the tables when they do not exist (
options.initSchema); each is idempotent. - selectNowMillis() - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
-
A query of one row and one column, the store clock (
JdbcDialect.nowMillis()): what a renewal reads before its compare-and-set. - slot() - Method in record class me.ahoo.cosid.store.jdbc.JdbcTables
-
Returns the value of the
slotrecord component. - slots() - Method in class me.ahoo.cosid.store.jdbc.JdbcStore
- SQL_SERVER - Static variable in class me.ahoo.cosid.store.jdbc.JdbcDialects
-
SQL Server 2019 and later.
- STATEMENT - Enum constant in enum class me.ahoo.cosid.store.jdbc.FetchPlan
-
From the statement that wrote it, in one round trip: PostgreSQL
returning, SQL Serveroutput, MySQL/MariaDB thelast_insert_idthe statement sets, which the driver returns as its generated key. - supports(DatabaseMetaData) - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
-
Whether this dialect is the one of a database.
T
- tables() - Method in class me.ahoo.cosid.store.jdbc.JdbcSession
-
The table names of the store.
- tables() - Method in class me.ahoo.cosid.store.jdbc.JdbcStore
-
The table names.
- toString() - Method in record class me.ahoo.cosid.store.jdbc.JdbcTables
-
Returns a string representation of this record class.
- transaction(JdbcSession.SqlWork<T>) - Method in class me.ahoo.cosid.store.jdbc.JdbcSession
-
Runs
workin oneREAD COMMITTEDtransaction (06 §2.1), then puts the auto-commit mode and the isolation level of the pooled connection back. - TRANSACTION - Enum constant in enum class me.ahoo.cosid.store.jdbc.FetchPlan
-
In one transaction: an update of the row, then a read of it, which the row lock keeps exact.
- type() - Method in class me.ahoo.cosid.store.jdbc.JdbcStoreProvider
- TYPE - Static variable in class me.ahoo.cosid.store.jdbc.JdbcStoreProvider
-
The store type.
V
- valueOf(String) - Static method in enum class me.ahoo.cosid.store.jdbc.FetchPlan
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class me.ahoo.cosid.store.jdbc.FetchPlan
-
Returns an array containing the constants of this enum class, in the order they are declared.
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form