@Override protected void updateEntryExpiryPossible() { super.updateEntryExpiryPossible(); if (!isEntryExpiryPossible()) { // since expiration is no longer possible cleanup the tasks cancelAllEntryExpiryTasks(); } }
public CustomExpiry setCustomEntryIdleTimeout(CustomExpiry custom) { checkReadiness(); if (custom != null && !this.statisticsEnabled) { throw new IllegalStateException( LocalizedStrings.AbstractRegion_CANNOT_SET_IDLE_TIMEOUT_WHEN_STATISTICS_ARE_DISABLED.toLocalizedString()); } CustomExpiry old = getCustomEntryIdleTimeout(); this.customEntryIdleTimeout = custom; updateEntryExpiryPossible(); idleTimeoutChanged(getEntryIdleTimeout()); return old; }
public CustomExpiry setCustomEntryTimeToLive(CustomExpiry custom) { checkReadiness(); if (custom != null && !this.statisticsEnabled) { throw new IllegalStateException( LocalizedStrings.AbstractRegion_CANNOT_SET_CUSTOM_TIME_TO_LIVE_WHEN_STATISTICS_ARE_DISABLED.toLocalizedString()); } CustomExpiry old = getCustomEntryTimeToLive(); this.customEntryTimeToLive = custom; updateEntryExpiryPossible(); timeToLiveChanged(getEntryTimeToLive()); return old; }
public CustomExpiry setCustomEntryIdleTimeout(CustomExpiry custom) { checkReadiness(); if (custom != null && !this.statisticsEnabled) { throw new IllegalStateException( LocalizedStrings.AbstractRegion_CANNOT_SET_IDLE_TIMEOUT_WHEN_STATISTICS_ARE_DISABLED.toLocalizedString()); } CustomExpiry old = getCustomEntryIdleTimeout(); this.customEntryIdleTimeout = custom; updateEntryExpiryPossible(); idleTimeoutChanged(getEntryIdleTimeout()); return old; }
public CustomExpiry setCustomEntryTimeToLive(CustomExpiry custom) { checkReadiness(); if (custom != null && !this.statisticsEnabled) { throw new IllegalStateException( LocalizedStrings.AbstractRegion_CANNOT_SET_CUSTOM_TIME_TO_LIVE_WHEN_STATISTICS_ARE_DISABLED.toLocalizedString()); } CustomExpiry old = getCustomEntryTimeToLive(); this.customEntryTimeToLive = custom; updateEntryExpiryPossible(); timeToLiveChanged(getEntryTimeToLive()); return old; }
@Override protected void updateEntryExpiryPossible() { super.updateEntryExpiryPossible(); if (isEntryExpiryPossible() || isRegionExpiryPossible()) { if (this.txExpirationLock == null) { // HACK HACK stopper can be null if we're called // from the superclass constructor :-( CancelCriterion hack = this.stopper; if (hack == null) { hack = new Stopper(); } this.txExpirationLock = new StoppableReentrantReadWriteLock(true, hack); } } else { this.txExpirationLock = null; // since expiration is no longer possible cleanup the tasks cancelAllEntryExpiryTasks(); } }
public ExpirationAttributes setEntryTimeToLive(ExpirationAttributes timeToLive) { checkReadiness(); if (timeToLive == null) { throw new IllegalArgumentException(LocalizedStrings.AbstractRegion_TIMETOLIVE_MUST_NOT_BE_NULL.toLocalizedString()); } checkEntryTimeoutAction("timeToLive", timeToLive.getAction()); if (!this.statisticsEnabled) { throw new IllegalStateException(LocalizedStrings.AbstractRegion_CANNOT_SET_TIME_TO_LIVE_WHEN_STATISTICS_ARE_DISABLED.toLocalizedString()); } ExpirationAttributes oldAttrs = getEntryTimeToLive(); this.entryTimeToLive = timeToLive.getTimeout(); this.entryTimeToLiveExpirationAction = timeToLive.getAction(); setEntryTimeToLiveAtts(); updateEntryExpiryPossible(); timeToLiveChanged(oldAttrs); return oldAttrs; }
public ExpirationAttributes setEntryIdleTimeout( ExpirationAttributes idleTimeout) { checkReadiness(); if (idleTimeout == null) { throw new IllegalArgumentException(LocalizedStrings.AbstractRegion_IDLETIMEOUT_MUST_NOT_BE_NULL.toLocalizedString()); } checkEntryTimeoutAction("idleTimeout", idleTimeout.getAction()); if (!this.statisticsEnabled) { throw new IllegalStateException(LocalizedStrings.AbstractRegion_CANNOT_SET_IDLE_TIMEOUT_WHEN_STATISTICS_ARE_DISABLED.toLocalizedString()); } ExpirationAttributes oldAttrs = getEntryIdleTimeout(); this.entryIdleTimeout = idleTimeout.getTimeout(); this.entryIdleTimeoutExpirationAction = idleTimeout.getAction(); setEntryIdleTimeoutAtts(); updateEntryExpiryPossible(); idleTimeoutChanged(oldAttrs); return oldAttrs; }
public ExpirationAttributes setEntryIdleTimeout( ExpirationAttributes idleTimeout) { checkReadiness(); if (idleTimeout == null) { throw new IllegalArgumentException(LocalizedStrings.AbstractRegion_IDLETIMEOUT_MUST_NOT_BE_NULL.toLocalizedString()); } checkEntryTimeoutAction("idleTimeout", idleTimeout.getAction()); if (!this.statisticsEnabled) { throw new IllegalStateException(LocalizedStrings.AbstractRegion_CANNOT_SET_IDLE_TIMEOUT_WHEN_STATISTICS_ARE_DISABLED.toLocalizedString()); } ExpirationAttributes oldAttrs = getEntryIdleTimeout(); this.entryIdleTimeout = idleTimeout.getTimeout(); this.entryIdleTimeoutExpirationAction = idleTimeout.getAction(); setEntryIdleTimeoutAtts(); updateEntryExpiryPossible(); idleTimeoutChanged(oldAttrs); return oldAttrs; }
public ExpirationAttributes setEntryTimeToLive(ExpirationAttributes timeToLive) { checkReadiness(); if (timeToLive == null) { throw new IllegalArgumentException(LocalizedStrings.AbstractRegion_TIMETOLIVE_MUST_NOT_BE_NULL.toLocalizedString()); } checkEntryTimeoutAction("timeToLive", timeToLive.getAction()); if (!this.statisticsEnabled) { throw new IllegalStateException(LocalizedStrings.AbstractRegion_CANNOT_SET_TIME_TO_LIVE_WHEN_STATISTICS_ARE_DISABLED.toLocalizedString()); } ExpirationAttributes oldAttrs = getEntryTimeToLive(); this.entryTimeToLive = timeToLive.getTimeout(); this.entryTimeToLiveExpirationAction = timeToLive.getAction(); setEntryTimeToLiveAtts(); updateEntryExpiryPossible(); timeToLiveChanged(oldAttrs); return oldAttrs; }
setEntryIdleTimeoutAtts(); this.customEntryIdleTimeout = attrs.getCustomEntryIdleTimeout(); updateEntryExpiryPossible(); this.statisticsEnabled = attrs.getStatisticsEnabled(); this.ignoreJTA = attrs.getIgnoreJTA();
setEntryIdleTimeoutAtts(); this.customEntryIdleTimeout = attrs.getCustomEntryIdleTimeout(); updateEntryExpiryPossible(); this.statisticsEnabled = attrs.getStatisticsEnabled(); this.ignoreJTA = attrs.getIgnoreJTA();