Class RedissonCachedListingService
java.lang.Object
org.oxerr.ticket.inventory.support.cached.redisson.RedissonCachedListingServiceSupport<String,String,BrokerListing,VividSeatsListing,VividSeatsEvent,VividSeatsCachedListing>
org.oxerr.vividseats.client.cached.redisson.inventory.RedissonCachedListingService
- All Implemented Interfaces:
org.oxerr.ticket.inventory.support.cached.CachedListingService<String,
,String, BrokerListing, VividSeatsListing, VividSeatsEvent> VividSeatsCachedListingService
public class RedissonCachedListingService
extends org.oxerr.ticket.inventory.support.cached.redisson.RedissonCachedListingServiceSupport<String,String,BrokerListing,VividSeatsListing,VividSeatsEvent,VividSeatsCachedListing>
implements VividSeatsCachedListingService
-
Field Summary
Fields inherited from class org.oxerr.ticket.inventory.support.cached.redisson.RedissonCachedListingServiceSupport
executor, keyPrefix, redisson
-
Constructor Summary
ConstructorDescriptionRedissonCachedListingService
(ListingService listingService, org.redisson.api.RedissonClient redissonClient, String keyPrefix, Executor executor) Constructs with defaultListingConfiguration
and defaultRetryConfiguration
.RedissonCachedListingService
(ListingService listingService, org.redisson.api.RedissonClient redissonClient, String keyPrefix, Executor executor, org.oxerr.ticket.inventory.support.cached.redisson.ListingConfiguration listingConfiguration) Constructs with specifiedListingConfiguration
and specifiedRetryConfiguration
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createListing
(VividSeatsEvent event, VividSeatsListing listing) protected void
deleteListing
(VividSeatsEvent event, String listingId) protected int
getPriority
(VividSeatsEvent event, VividSeatsListing listing, VividSeatsCachedListing cachedListing) protected boolean
shouldCreate
(VividSeatsEvent event, VividSeatsListing listing, VividSeatsCachedListing cachedListing) protected boolean
shouldDelete
(VividSeatsEvent event, Set<String> inventoryListingIds, String listingId, VividSeatsCachedListing cachedListing) protected boolean
shouldUpdate
(VividSeatsEvent event, VividSeatsListing listing, VividSeatsCachedListing cachedListing) protected VividSeatsCachedListing
toCached
(VividSeatsEvent event, VividSeatsListing listing, org.oxerr.ticket.inventory.support.cached.redisson.Status status) Methods inherited from class org.oxerr.ticket.inventory.support.cached.redisson.RedissonCachedListingServiceSupport
callAsync, callAsync, createListing, deleteListing, getCache, getCache, getCacheName, getCacheName, getCacheNamePattern, getCacheNamesStream, getCacheNamesStream, getCacheSize, getEventCache, getListedCount, getListedRequest, getListedRequest, getListedRequest, getListedRequest, getRequest, getRequest, getRequest, getRequest, isListed, isListed, toSupplier, updateListing, updateListing, updateListings
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.oxerr.ticket.inventory.support.cached.CachedListingService
getCacheNamesStream, getCacheNamesStream, getCacheSize, getListedCount, getListedRequest, getListedRequest, getListedRequest, getListedRequest, getRequest, getRequest, getRequest, getRequest, isListed, isListed, updateListings
-
Constructor Details
-
RedissonCachedListingService
public RedissonCachedListingService(ListingService listingService, org.redisson.api.RedissonClient redissonClient, String keyPrefix, Executor executor) Constructs with defaultListingConfiguration
and defaultRetryConfiguration
.- Parameters:
listingService
- the listing service.redissonClient
- the redisson client.keyPrefix
- the key prefix for the cache.executor
- the executor.
-
RedissonCachedListingService
public RedissonCachedListingService(ListingService listingService, org.redisson.api.RedissonClient redissonClient, String keyPrefix, Executor executor, org.oxerr.ticket.inventory.support.cached.redisson.ListingConfiguration listingConfiguration) Constructs with specifiedListingConfiguration
and specifiedRetryConfiguration
.- Parameters:
listingService
- the listing service.redissonClient
- the redisson client.keyPrefix
- the key prefix for the cache.executor
- the executor.listingConfiguration
- the listing configuration.
-
-
Method Details
-
shouldCreate
protected boolean shouldCreate(@Nonnull VividSeatsEvent event, @Nonnull VividSeatsListing listing, @Nullable VividSeatsCachedListing cachedListing) - Overrides:
shouldCreate
in classorg.oxerr.ticket.inventory.support.cached.redisson.RedissonCachedListingServiceSupport<String,
String, BrokerListing, VividSeatsListing, VividSeatsEvent, VividSeatsCachedListing>
-
shouldUpdate
protected boolean shouldUpdate(@Nonnull VividSeatsEvent event, @Nonnull VividSeatsListing listing, @Nullable VividSeatsCachedListing cachedListing) - Overrides:
shouldUpdate
in classorg.oxerr.ticket.inventory.support.cached.redisson.RedissonCachedListingServiceSupport<String,
String, BrokerListing, VividSeatsListing, VividSeatsEvent, VividSeatsCachedListing>
-
getPriority
protected int getPriority(@Nonnull VividSeatsEvent event, @Nullable VividSeatsListing listing, @Nullable VividSeatsCachedListing cachedListing) - Overrides:
getPriority
in classorg.oxerr.ticket.inventory.support.cached.redisson.RedissonCachedListingServiceSupport<String,
String, BrokerListing, VividSeatsListing, VividSeatsEvent, VividSeatsCachedListing>
-
shouldDelete
protected boolean shouldDelete(@Nonnull VividSeatsEvent event, @Nonnull Set<String> inventoryListingIds, @Nonnull String listingId, @Nonnull VividSeatsCachedListing cachedListing) - Overrides:
shouldDelete
in classorg.oxerr.ticket.inventory.support.cached.redisson.RedissonCachedListingServiceSupport<String,
String, BrokerListing, VividSeatsListing, VividSeatsEvent, VividSeatsCachedListing>
-
createListing
- Specified by:
createListing
in classorg.oxerr.ticket.inventory.support.cached.redisson.RedissonCachedListingServiceSupport<String,
String, BrokerListing, VividSeatsListing, VividSeatsEvent, VividSeatsCachedListing> - Throws:
IOException
-
deleteListing
- Specified by:
deleteListing
in classorg.oxerr.ticket.inventory.support.cached.redisson.RedissonCachedListingServiceSupport<String,
String, BrokerListing, VividSeatsListing, VividSeatsEvent, VividSeatsCachedListing> - Throws:
IOException
-
toCached
protected VividSeatsCachedListing toCached(VividSeatsEvent event, VividSeatsListing listing, org.oxerr.ticket.inventory.support.cached.redisson.Status status) - Specified by:
toCached
in classorg.oxerr.ticket.inventory.support.cached.redisson.RedissonCachedListingServiceSupport<String,
String, BrokerListing, VividSeatsListing, VividSeatsEvent, VividSeatsCachedListing>
-