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
ConstructorsConstructorDescriptionRedissonCachedListingService(ListingService listingService, org.redisson.api.RedissonClient redissonClient, String keyPrefix, Executor executor) Constructs with defaultListingConfigurationand defaultRetryConfiguration.RedissonCachedListingService(ListingService listingService, org.redisson.api.RedissonClient redissonClient, String keyPrefix, Executor executor, org.oxerr.ticket.inventory.support.cached.redisson.ListingConfiguration listingConfiguration) Constructs with specifiedListingConfigurationand specifiedRetryConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateListing(VividSeatsEvent event, VividSeatsListing listing) protected voiddeleteListing(VividSeatsEvent event, String listingId) protected intgetPriority(VividSeatsEvent event, VividSeatsListing listing, VividSeatsCachedListing cachedListing) protected booleanshouldCreate(VividSeatsEvent event, VividSeatsListing listing, VividSeatsCachedListing cachedListing) protected booleanshouldDelete(VividSeatsEvent event, Set<String> inventoryListingIds, String listingId, VividSeatsCachedListing cachedListing) protected booleanshouldUpdate(VividSeatsEvent event, VividSeatsListing listing, VividSeatsCachedListing cachedListing) protected VividSeatsCachedListingtoCached(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, updateListingsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 defaultListingConfigurationand 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 specifiedListingConfigurationand 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:
shouldCreatein 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:
shouldUpdatein 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:
getPriorityin 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:
shouldDeletein classorg.oxerr.ticket.inventory.support.cached.redisson.RedissonCachedListingServiceSupport<String,String, BrokerListing, VividSeatsListing, VividSeatsEvent, VividSeatsCachedListing>
-
createListing
- Specified by:
createListingin classorg.oxerr.ticket.inventory.support.cached.redisson.RedissonCachedListingServiceSupport<String,String, BrokerListing, VividSeatsListing, VividSeatsEvent, VividSeatsCachedListing> - Throws:
IOException
-
deleteListing
- Specified by:
deleteListingin 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:
toCachedin classorg.oxerr.ticket.inventory.support.cached.redisson.RedissonCachedListingServiceSupport<String,String, BrokerListing, VividSeatsListing, VividSeatsEvent, VividSeatsCachedListing>
-