!e.renewalsDone() && sameConstraints(lease, e.lease) && lease.canBatch(e.lease) && (renewDuration == Lease.ANY || renew - e.renew <= renewalRTT / 2 ||
!e.renewalsDone() && sameConstraints(lease, e.lease) && lease.canBatch(e.lease) && (renewDuration == Lease.ANY || renew - e.renew <= renewalRTT / 2 ||
/** * Another lease can be batched with this one if it is a * ClientLeaseMapWrapper, if it is either a member of the same lease * renewal set or sets are not isolated, if neither lease is deformed, if * the leases either both have the same client constraints or do not * implement RemoteMethodControl, and if the underlying client leases can * be batched. */ public boolean canBatch(Lease lease) { if (!(lease instanceof ClientLeaseWrapper)) return false; final ClientLeaseWrapper clw = (ClientLeaseWrapper) lease; if (set.isolateSets() && !set.equals(clw.set)) return false; if (isDeformed() || clw.isDeformed()) return false; Lease clientLease = getClientLease(); Lease otherClientLease = clw.getClientLease(); return sameConstraints(clientLease, otherClientLease) && clientLease.canBatch(otherClientLease); }