public PacketDefragmentator(int order, int total, int ttl) throws Exception { super(order, total); this.ttl = ttl; this.accumulator = new PassiveExpiringMap<>(ttl); }
@Inject public MemoryAccessTokenRepository(@Named(TOKEN_EXPIRATION_IN_MS) long durationInMilliseconds) { tokensExpirationDates = new PassiveExpiringMap<>(durationInMilliseconds); }
public MQTTSession(Vertx vertx, ConfigParser config) { this.vertx = vertx; this.decoder = new MQTTDecoder(); this.encoder = new MQTTEncoder(); this.securityEnabled = config.isSecurityEnabled(); this.retainSupport = config.isRetainSupport(); this.subscriptions = new LinkedHashMap<>(); this.qosUtils = new QOSUtils(); PassiveExpiringMap.ConstantTimeToLiveExpirationPolicy<String, List<Subscription>> expirePeriod = new PassiveExpiringMap.ConstantTimeToLiveExpirationPolicy<>( 30, TimeUnit.MINUTES); this.matchingSubscriptionsCache = new PassiveExpiringMap<>( expirePeriod, new HashMap<>() ); this.topicsManager = new MQTTTopicsManagerOptimized(); this.storeManager = new StoreManager(this.vertx); this.authenticatorAddress = config.getAuthenticatorAddress(); this.queue = new LinkedList<>(); }
expirePeriod = new PassiveExpiringMap.ConstantTimeToLiveExpirationPolicy<>( 1, TimeUnit.DAYS); this.db = new PassiveExpiringMap<>( expirePeriod, new LinkedHashMap<>() ); this.topicsManager = new MQTTTopicsManagerOptimized();