Skip to main content
atoti_jdbc.JdbcPingDiscoveryProtocol(
    url: Annotated[str, AfterValidator(normalize_jdbc_url)],
    *,
    driver: Annotated[str | None, AfterValidator(_validate_driver)] = None,
    username: str,
    password: str,
    delete_single_sql: str | None = None,
    initialize_sql: str | None = None,
    insert_single_sql: str | None = None,
    remove_all_data_on_view_change: bool = True,
    remove_old_coords_on_view_change: bool = True,
    select_all_pingdata_sql: str | None = None,
    update_store_on_view_change: bool | None = None,
    write_data_on_find: bool = True,
)
Discovery protocol relying on a JDBC connection. The set of nodes is stored in a database table, allowing each node to join the cluster without having to know any other node.

Attributes

username

str

password

str

delete_single_sql

str | None

initialize_sql

str | None

insert_single_sql

str | None

remove_all_data_on_view_change

“Defined by the FILE_PING protocol. See http://jgroups.org/manual4/index.html#_removal_of_zombie_files.

remove_old_coords_on_view_change

“Defined by the FILE_PING protocol. See http://jgroups.org/manual4/index.html#_removal_of_zombie_files.

select_all_pingdata_sql

str | None

update_store_on_view_change

Defined by the FILE_PING protocol. When True, the coordinator updates the backend store (JDBC table) on every view change, including when members leave or crash. If False, the table is only updated on joins. Enabling this ensures stale entries from crashed nodes (zombies) are removed. See http://jgroups.org/manual4/index.html#_jdbc_ping.

driver

The Java class name of the driver to use. This defines Hibernate’s DRIVER option. Inferred from url if None.

url

The JDBC connection string of the database. The "jdbc" scheme is optional but the database specific scheme (such as "h2") is mandatory. For instance:
  • "h2:/home/user/database/file/path;USER=username;PASSWORD=passwd"
  • "postgresql://postgresql.db.server:5430/example?user=username&password=passwd"
More examples can be found here. This defines Hibernate’s URL option.

write_data_on_find

“Defined by the FILE_PING protocol. See http://jgroups.org/manual4/index.html#_removal_of_zombie_files.