Module io.github.bucket4j.mariadb
Package io.github.bucket4j.mariadb
Class MariaDBSelectForUpdateBasedProxyManager<K>
java.lang.Object
io.github.bucket4j.distributed.proxy.AbstractProxyManager<K>
io.github.bucket4j.distributed.proxy.generic.select_for_update.AbstractSelectForUpdateBasedProxyManager<K>
io.github.bucket4j.mariadb.MariaDBSelectForUpdateBasedProxyManager<K>
- Type Parameters:
K- type of primary key
- All Implemented Interfaces:
ExpiredEntriesCleaner,ProxyManager<K>
public class MariaDBSelectForUpdateBasedProxyManager<K>
extends AbstractSelectForUpdateBasedProxyManager<K>
implements ExpiredEntriesCleaner
The extension of Bucket4j library addressed to support MariaDB
This implementation solves transaction/concurrency related problems via "SELECT FOR UPDATE" SQL syntax.
-
Constructor Summary
ConstructorsConstructorDescriptionMariaDBSelectForUpdateBasedProxyManager(SQLProxyConfiguration<K> configuration) Deprecated.MariaDBSelectForUpdateBasedProxyManager(Bucket4jMariaDB.MariaDBSelectForUpdateBasedProxyManagerBuilder<K> builder) -
Method Summary
Modifier and TypeMethodDescriptionprotected SelectForUpdateBasedTransactionallocateTransaction(K key, Optional<Long> timeoutNanos) booleanintremoveExpired(int batchSize) voidremoveProxy(K key) Methods inherited from class io.github.bucket4j.distributed.proxy.generic.select_for_update.AbstractSelectForUpdateBasedProxyManager
applyTimeout, execute, executeAsync, isAsyncModeSupported, removeAsyncMethods inherited from class io.github.bucket4j.distributed.proxy.AbstractProxyManager
asAsync, builder, currentTimeNanos, getBackwardCompatibilityVersion, getClientSideConfig, getClientSideTime, getProxyConfigurationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.bucket4j.distributed.proxy.ProxyManager
getProxy, withMapper
-
Constructor Details
-
MariaDBSelectForUpdateBasedProxyManager
public MariaDBSelectForUpdateBasedProxyManager(Bucket4jMariaDB.MariaDBSelectForUpdateBasedProxyManagerBuilder<K> builder) -
MariaDBSelectForUpdateBasedProxyManager
Deprecated.
-
-
Method Details
-
allocateTransaction
- Specified by:
allocateTransactionin classAbstractSelectForUpdateBasedProxyManager<K>
-
removeProxy
- Specified by:
removeProxyin interfaceProxyManager<K>
-
isExpireAfterWriteSupported
public boolean isExpireAfterWriteSupported()- Specified by:
isExpireAfterWriteSupportedin interfaceProxyManager<K>
-
removeExpired
public int removeExpired(int batchSize) - Specified by:
removeExpiredin interfaceExpiredEntriesCleaner
-
Bucket4jMariaDB.selectForUpdateBasedBuilder(DataSource)instead