public class PostgreSQLSelectForUpdateBasedProxyManager extends AbstractSelectForUpdateBasedProxyManager<Long>
SQLProxyConfiguration include BucketTableSettings which takes settings for the table to work with Bucket4j.
This implementation solves transaction related problems via Based on SELECT FOR UPDATE SQL syntax. This prevents them from being modified or deleted by other transactions until the current transaction ends. That is, other transactions that attempt UPDATE, DELETE, or SELECT FOR UPDATE of these rows will be blocked until the current transaction ends. Also, if an UPDATE, DELETE, or SELECT FOR UPDATE from another transaction has already locked a selected row or rows, SELECT FOR UPDATE will wait for the other transaction to complete, and will then lock and return the updated row (or no row, if the row was deleted). Within a SERIALIZABLE transaction, however, an error will be thrown if a row to be locked has changed since the transaction started.
SQLProxyConfigurationBuilder} to get more information how to build {@link SQLProxyConfiguration}| Constructor and Description |
|---|
PostgreSQLSelectForUpdateBasedProxyManager(SQLProxyConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
protected SelectForUpdateBasedTransaction |
allocateTransaction(Long key) |
void |
removeProxy(Long key) |
execute, executeAsync, isAsyncModeSupported, removeAsyncasAsync, builder, getBackwardCompatibilityVersion, getClientSideConfig, getClientSideTime, getProxyConfigurationpublic PostgreSQLSelectForUpdateBasedProxyManager(SQLProxyConfiguration configuration)
configuration - SQLProxyConfiguration configuration.protected SelectForUpdateBasedTransaction allocateTransaction(Long key)
allocateTransaction in class AbstractSelectForUpdateBasedProxyManager<Long>public void removeProxy(Long key)
Copyright © 2022. All rights reserved.