@Override protected ExpirationAttributes getIdleAttributes() { return getLocalRegion().getRegionIdleTimeout(); } @Override
@Override protected final boolean localInvalidate() { return getLocalRegion().expireRegion(this, false, false); }
@Override protected final long getLastModifiedTime() { return getLocalRegion().getLastModifiedTime(); }
@Override protected final long getLastAccessedTime() { return getLocalRegion().getLastAccessedTime(); }
@Override protected ExpirationAttributes getTTLAttributes() { return getLocalRegion().getRegionTimeToLive(); }
@Override protected final long getLastAccessedTime() { return getLocalRegion().getLastAccessedTime(); }
@Override protected final boolean destroy(boolean isPending) throws CacheException { return getLocalRegion().expireRegion(this, true, true); }
@Override protected final boolean invalidate() throws TimeoutException { return getLocalRegion().expireRegion(this, true, false); }
@Override protected ExpirationAttributes getIdleAttributes() { return getLocalRegion().getRegionIdleTimeout(); } @Override
@Override protected final long getLastModifiedTime() { return getLocalRegion().getLastModifiedTime(); }
@Override protected final boolean localDestroy() throws CacheException { return getLocalRegion().expireRegion(this, false, true); }
@Override protected ExpirationAttributes getTTLAttributes() { return getLocalRegion().getRegionTimeToLive(); }
@Override final protected void reschedule() throws CacheException { if (isCacheClosing() || getLocalRegion().isClosed() || getLocalRegion().isDestroyed() || !isExpirationAllowed()) { return; } addExpiryTask(); }
@Override protected final boolean invalidate() throws TimeoutException { LocalRegion lr = getLocalRegion(); if (lr.regionInvalid) { return false; } RegionEventImpl event = new RegionEventImpl(lr, Operation.REGION_EXPIRE_INVALIDATE, null, false, lr.getMyId()); lr.basicInvalidateRegion(event); return true; }
@Override protected final boolean localInvalidate() { LocalRegion lr = getLocalRegion(); if (lr.regionInvalid) return false; RegionEventImpl event = new RegionEventImpl(lr, Operation.REGION_EXPIRE_LOCAL_INVALIDATE, null, false, lr.getMyId()); lr.basicInvalidateRegion(event); return true; }
@Override final protected void reschedule() throws CacheException { if (isCacheClosing() || getLocalRegion().isClosed() || getLocalRegion().isDestroyed() || !isExpirationAllowed()) { return; } addExpiryTask(); if (expiryTaskListener != null) { expiryTaskListener.afterReschedule(this); } }
@Override protected final boolean localDestroy() throws CacheException { LocalRegion lr = getLocalRegion(); RegionEventImpl event = new RegionEventImpl(lr, Operation.REGION_EXPIRE_LOCAL_DESTROY, null, false, lr.getMyId(), lr.generateEventID() /* generate EventID */); lr.basicDestroyRegion(event, false); return true; }
@Override protected final boolean destroy(boolean isPending) throws CacheException { LocalRegion lr = getLocalRegion(); RegionEventImpl event = new RegionEventImpl(lr, Operation.REGION_EXPIRE_DESTROY, null, false, lr.getMyId(), lr.generateEventID() /* generate EventID */); lr.basicDestroyRegion(event, true); return true; }
@Override public String toString() { String expireTime = "<unavailable>"; try { expireTime = String.valueOf(getExpirationTime()); } catch (VirtualMachineError err) { SystemFailure.initiateFailure(err); // If this ever returns, rethrow the error. We're poisoned // now, so don't let this thread continue. throw err; } catch (Throwable e) { // Whenever you catch Error or Throwable, you must also // catch VirtualMachineError (see above). However, there is // _still_ a possibility that you are dealing with a cascading // error condition, so you also need to check to see if the JVM // is still usable: SystemFailure.checkFailure(); } return super.toString() + " for " + getLocalRegion().getFullPath() + ", expiration time: " + expireTime + " [now: " + getNow() + "]"; } }
@Override public String toString() { String expireTime = "<unavailable>"; try { expireTime = String.valueOf(getExpirationTime()); } catch (Throwable e) { Error err; if (e instanceof Error && SystemFailure.isJVMFailureError( err = (Error)e)) { SystemFailure.initiateFailure(err); // If this ever returns, rethrow the error. We're poisoned // now, so don't let this thread continue. throw err; } // Whenever you catch Error or Throwable, you must also // check for fatal JVM error (see above). However, there is // _still_ a possibility that you are dealing with a cascading // error condition, so you also need to check to see if the JVM // is still usable: SystemFailure.checkFailure(); } return super.toString() + " for " + getLocalRegion().getFullPath() + ", expiration time: " + expireTime + " [now: " + getNow() + "]"; } }