Index

A C D E F H I J L M N O P R S T V 
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.initSchema on tables created by an earlier 5.0 pre-release (cosid_namespace.slot_offset came 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; initSchema runs 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 ServiceLoader first, 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
createIndex(String, String, List<String>) - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
The statement that creates an index, for options.initSchema on 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_value a reserve wrote (options.fetchPlan, R1-jdbc-06; 4.x fetch-plan).
firstRows(String, String, String, String, int) - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
Selects the first rows rows of orderBy that match where, without locking them (limit; SQL Server top).

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 a cosid_namespace of 5.0.0-alpha.1 gets the slot_offset column 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 with StoreTimeoutException.

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 JdbcDialect sees it: the connection in auto-commit mode, the table names, and statements that carry the store timeout (StoreConfig.timeout as queryTimeout).
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
Opens JdbcStores, type jdbc (06-stores.md §1), registered with ServiceLoader.
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, slotTable and namespaceTable.
JdbcTables(String, String, String) - Constructor for record class me.ahoo.cosid.store.jdbc.JdbcTables
Creates an instance of a JdbcTables record 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.dialect and 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 namespace record 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 range record 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-*.sql resource) to these names.
reserve(JdbcSession, String, long, long) - Method in interface me.ahoo.cosid.store.jdbc.JdbcDialect
Reserves size values of key in one round trip where the database allows it: a key that does not exist is created with next_value = initialOffset + size; an existing key that is not sealed and has next_value <= Long.MAX_VALUE - size gets next_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 slot record 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 Server output, MySQL/MariaDB the last_insert_id the 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 work in one READ COMMITTED transaction (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.
A C D E F H I J L M N O P R S T V 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form