Class BlockingTransactionalRedisDataSourceImpl
- java.lang.Object
-
- io.quarkus.redis.runtime.datasource.BlockingTransactionalRedisDataSourceImpl
-
- All Implemented Interfaces:
TransactionalRedisDataSource
public class BlockingTransactionalRedisDataSourceImpl extends Object implements TransactionalRedisDataSource
-
-
Constructor Summary
Constructors Constructor Description BlockingTransactionalRedisDataSourceImpl(ReactiveTransactionalRedisDataSource api, Duration timeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K> TransactionalBitMapCommands<K>
bitmap(Class<K> redisKeyType)
Gets the object to execute commands manipulating bitmap data structures.void
discard()
Discard the current transaction.boolean
discarded()
Checks if the current transaction has been discarded by the uservoid
execute(io.vertx.mutiny.redis.client.Command command, String... args)
Executes a command.void
execute(io.vertx.redis.client.Command command, String... args)
Executes a command.void
execute(String command, String... args)
Executes a command.<K,V>
TransactionalGeoCommands<K,V>geo(Class<K> redisKeyType, Class<V> memberType)
Gets the object to execute commands manipulating geo items (a.k.a.<K,F,V>
TransactionalHashCommands<K,F,V>hash(Class<K> redisKeyType, Class<F> typeOfField, Class<V> typeOfValue)
Gets the object to execute commands manipulating hashes (a.k.a.<K,V>
TransactionalHyperLogLogCommands<K,V>hyperloglog(Class<K> redisKeyType, Class<V> memberType)
Gets the object to execute commands manipulating hyperloglog data structures.<K> TransactionalKeyCommands<K>
key(Class<K> redisKeyType)
Gets the object to execute commands manipulating keys and expiration times.<K,V>
TransactionalListCommands<K,V>list(Class<K> redisKeyType, Class<V> memberType)
Gets the object to execute commands manipulating lists.<K,V>
TransactionalSetCommands<K,V>set(Class<K> redisKeyType, Class<V> memberType)
Gets the object to execute commands manipulating sets.<K,V>
TransactionalSortedSetCommands<K,V>sortedSet(Class<K> redisKeyType, Class<V> valueType)
Gets the object to execute commands manipulating sorted sets.<K,V>
TransactionalStringCommands<K,V>string(Class<K> redisKeyType, Class<V> valueType)
Gets the object to execute commands manipulating stored strings.<K,V>
TransactionalValueCommands<K,V>value(Class<K> redisKeyType, Class<V> valueType)
Gets the object to execute commands manipulating stored strings.
-
-
-
Constructor Detail
-
BlockingTransactionalRedisDataSourceImpl
public BlockingTransactionalRedisDataSourceImpl(ReactiveTransactionalRedisDataSource api, Duration timeout)
-
-
Method Detail
-
discard
public void discard()
Description copied from interface:TransactionalRedisDataSource
Discard the current transaction.- Specified by:
discard
in interfaceTransactionalRedisDataSource
-
discarded
public boolean discarded()
Description copied from interface:TransactionalRedisDataSource
Checks if the current transaction has been discarded by the user- Specified by:
discarded
in interfaceTransactionalRedisDataSource
- Returns:
- if the current transaction has been discarded by the user
-
hash
public <K,F,V> TransactionalHashCommands<K,F,V> hash(Class<K> redisKeyType, Class<F> typeOfField, Class<V> typeOfValue)
Description copied from interface:TransactionalRedisDataSource
Gets the object to execute commands manipulating hashes (a.k.a.Map<F, V>
).If you want to use a hash of
<String -> Person>
stored using String identifier, you would use:hash(String.class, String.class, Person.class)
. If you want to use a hash of<String -> Person>
stored using UUID identifier, you would use:hash(UUID.class, String.class, Person.class)
.- Specified by:
hash
in interfaceTransactionalRedisDataSource
- Type Parameters:
K
- the type of the redis keyF
- the type of the fields (map's keys)V
- the type of the value- Parameters:
redisKeyType
- the class of the keystypeOfField
- the class of the fieldstypeOfValue
- the class of the values- Returns:
- the object to execute commands manipulating hashes (a.k.a.
Map<K, V>
).
-
geo
public <K,V> TransactionalGeoCommands<K,V> geo(Class<K> redisKeyType, Class<V> memberType)
Description copied from interface:TransactionalRedisDataSource
Gets the object to execute commands manipulating geo items (a.k.a.{longitude, latitude, member}
).V
represents the type of the member, i.e. the localized thing.- Specified by:
geo
in interfaceTransactionalRedisDataSource
- Type Parameters:
K
- the type of the redis keyV
- the type of the member- Parameters:
redisKeyType
- the class of the keysmemberType
- the class of the members- Returns:
- the object to execute geo commands.
-
key
public <K> TransactionalKeyCommands<K> key(Class<K> redisKeyType)
Description copied from interface:TransactionalRedisDataSource
Gets the object to execute commands manipulating keys and expiration times.- Specified by:
key
in interfaceTransactionalRedisDataSource
- Type Parameters:
K
- the type of the key- Parameters:
redisKeyType
- the type of the keys- Returns:
- the object to execute commands manipulating keys.
-
set
public <K,V> TransactionalSetCommands<K,V> set(Class<K> redisKeyType, Class<V> memberType)
Description copied from interface:TransactionalRedisDataSource
Gets the object to execute commands manipulating sets.- Specified by:
set
in interfaceTransactionalRedisDataSource
- Type Parameters:
K
- the type of the keyV
- the type of the member- Parameters:
redisKeyType
- the type of the keysmemberType
- the type of the member stored in each set- Returns:
- the object to manipulate sets.
-
sortedSet
public <K,V> TransactionalSortedSetCommands<K,V> sortedSet(Class<K> redisKeyType, Class<V> valueType)
Description copied from interface:TransactionalRedisDataSource
Gets the object to execute commands manipulating sorted sets.- Specified by:
sortedSet
in interfaceTransactionalRedisDataSource
- Type Parameters:
K
- the type of the keyV
- the type of the value- Parameters:
redisKeyType
- the type of the keysvalueType
- the type of the value sorted in the sorted sets- Returns:
- the object to manipulate sorted sets.
-
string
public <K,V> TransactionalStringCommands<K,V> string(Class<K> redisKeyType, Class<V> valueType)
Description copied from interface:TransactionalRedisDataSource
Gets the object to execute commands manipulating stored strings.- Specified by:
string
in interfaceTransactionalRedisDataSource
- Type Parameters:
K
- the type of the keyV
- the type of the value- Parameters:
redisKeyType
- the type of the keysvalueType
- the type of the value, often String, or the value are encoded/decoded using codecs.- Returns:
- the object to manipulate stored strings.
-
value
public <K,V> TransactionalValueCommands<K,V> value(Class<K> redisKeyType, Class<V> valueType)
Description copied from interface:TransactionalRedisDataSource
Gets the object to execute commands manipulating stored strings.NOTE: Instead of
string
, this group is namedvalue
to avoid the confusion with the Java String type. Indeed, Redis strings can be strings, numbers, byte arrays...- Specified by:
value
in interfaceTransactionalRedisDataSource
- Type Parameters:
K
- the type of the keyV
- the type of the value- Parameters:
redisKeyType
- the type of the keysvalueType
- the type of the value, often String, or the value are encoded/decoded using codecs.- Returns:
- the object to manipulate stored strings.
-
list
public <K,V> TransactionalListCommands<K,V> list(Class<K> redisKeyType, Class<V> memberType)
Description copied from interface:TransactionalRedisDataSource
Gets the object to execute commands manipulating lists.- Specified by:
list
in interfaceTransactionalRedisDataSource
- Type Parameters:
K
- the type of the keyV
- the type of the member- Parameters:
redisKeyType
- the type of the keysmemberType
- the type of the member stored in each list- Returns:
- the object to manipulate sets.
-
hyperloglog
public <K,V> TransactionalHyperLogLogCommands<K,V> hyperloglog(Class<K> redisKeyType, Class<V> memberType)
Description copied from interface:TransactionalRedisDataSource
Gets the object to execute commands manipulating hyperloglog data structures.- Specified by:
hyperloglog
in interfaceTransactionalRedisDataSource
- Type Parameters:
K
- the type of the keyV
- the type of the member- Parameters:
redisKeyType
- the type of the keysmemberType
- the type of the member stored in the data structure- Returns:
- the object to manipulate hyper log log data structures.
-
bitmap
public <K> TransactionalBitMapCommands<K> bitmap(Class<K> redisKeyType)
Description copied from interface:TransactionalRedisDataSource
Gets the object to execute commands manipulating bitmap data structures.- Specified by:
bitmap
in interfaceTransactionalRedisDataSource
- Type Parameters:
K
- the type of the key- Parameters:
redisKeyType
- the type of the keys- Returns:
- the object to manipulate bitmap data structures.
-
execute
public void execute(String command, String... args)
Description copied from interface:TransactionalRedisDataSource
Executes a command. This method is used to execute commands not offered by the API.- Specified by:
execute
in interfaceTransactionalRedisDataSource
- Parameters:
command
- the command nameargs
- the parameters, encoded as String.
-
execute
public void execute(io.vertx.mutiny.redis.client.Command command, String... args)
Description copied from interface:TransactionalRedisDataSource
Executes a command. This method is used to execute commands not offered by the API.- Specified by:
execute
in interfaceTransactionalRedisDataSource
- Parameters:
command
- the commandargs
- the parameters, encoded as String.
-
execute
public void execute(io.vertx.redis.client.Command command, String... args)
Description copied from interface:TransactionalRedisDataSource
Executes a command. This method is used to execute commands not offered by the API.- Specified by:
execute
in interfaceTransactionalRedisDataSource
- Parameters:
command
- the commandargs
- the parameters, encoded as String.
-
-