protected void markExpirable ( long expiryTime ) { if ( expiryTime > 0 && expiryTime < Long . MAX_VALUE ) { hasEntryWithExpiration = true ; } if ( isPrimary ( ) && hasEntryWithExpiration ) { cacheService . getExpirationManager ( ) . scheduleExpirationTask ( ) ; } }
This method marks current replica as expirable and also starts expiration task if necessary .