public class PostgreSQLadvisoryLockBasedProxyManager extends AbstractLockBasedProxyManager<Long>
SQLProxyConfiguration include BucketTableSettings which takes settings for the table to work with Bucket4j.
This implementation solves transaction related problems via pg_advisory_xact_lock locks an application-defined resource, which can be identified either by a single 64-bit key value or two 32-bit key values (note that these two key spaces do not overlap). If another session already holds a lock on the same resource identifier, this function will wait until the resource becomes available. The lock is exclusive. Multiple lock requests stack so that if the same resource is locked three times it must then be unlocked three times to be released for other sessions use. The lock is automatically released at the end of the current transaction and cannot be released explicitly.
SQLProxyConfigurationBuilder} to get more information how to build {@link SQLProxyConfiguration}| Constructor and Description |
|---|
PostgreSQLadvisoryLockBasedProxyManager(SQLProxyConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
protected LockBasedTransaction |
allocateTransaction(Long key) |
void |
removeProxy(Long key) |
execute, executeAsync, isAsyncModeSupported, removeAsyncasAsync, builder, getBackwardCompatibilityVersion, getClientSideConfig, getClientSideTime, getProxyConfigurationpublic PostgreSQLadvisoryLockBasedProxyManager(SQLProxyConfiguration configuration)
configuration - SQLProxyConfiguration configuration.protected LockBasedTransaction allocateTransaction(Long key)
allocateTransaction in class AbstractLockBasedProxyManager<Long>public void removeProxy(Long key)
Copyright © 2022. All rights reserved.