Source:
public void doRegistration(final SchedulerDriver driver, Protos.FrameworkID id) { _driver = driver; try { _state.put(FRAMEWORK_ID, id.getValue()); } catch (IOException e) { LOG.error("Halting process...", e); Runtime.getRuntime().halt(1); } Number filterSeconds = Optional.fromNullable((Number) _conf.get(CONF_MESOS_OFFER_FILTER_SECONDS)).or(120); final Protos.Filters filters = Protos.Filters.newBuilder() .setRefuseSeconds(filterSeconds.intValue()) .build(); _offers = new RotatingMap<>( new RotatingMap.ExpiredCallback<Protos.OfferID, Protos.Offer>() { @Override public void expire(Protos.OfferID key, Protos.Offer val) { driver.declineOffer( val.getId(), filters ); } } ); Number lruCacheSize = Optional.fromNullable((Number) _conf.get(CONF_MESOS_OFFER_LRU_CACHE_SIZE)).or(1000); final int intLruCacheSize = lruCacheSize.intValue(); _usedOffers = Collections.synchronizedMap(new LinkedHashMap<Protos.TaskID, Protos.Offer>(intLruCacheSize + 1, .75F, true) { public boolean removeEldestEntry(Map.Entry eldest) { return size() > intLruCacheSize; } }); Number offerExpired = Optional.fromNullable((Number) _conf.get(Config.NIMBUS_MONITOR_FREQ_SECS)).or(60); Number expiryMultiplier = Optional.fromNullable((Number) _conf.get(CONF_MESOS_OFFER_EXPIRY_MULTIPLIER)).or(2.5); _timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { try { synchronized (_offersLock) { _offers.rotate(); } } catch (Throwable t) { LOG.error("Received fatal error Halting process...", t); Runtime.getRuntime().halt(2); } } }, 0, Math.round(1000 * expiryMultiplier.doubleValue() * offerExpired.intValue())); }

Target:
public void doRegistration(final SchedulerDriver driver, Protos.FrameworkID id) { _driver = driver; try { _state.put(FRAMEWORK_ID, id.getValue()); } catch (IOException e) { LOG.error("Halting process...", e); Runtime.getRuntime().halt(1); } Number filterSeconds = Optional.fromNullable((Number) _conf.get(CONF_MESOS_OFFER_FILTER_SECONDS)).or(120); final Protos.Filters filters = Protos.Filters.newBuilder() .setRefuseSeconds(filterSeconds.intValue()) .build(); _offers = new RotatingMap<>( new RotatingMap.ExpiredCallback<Protos.OfferID, Protos.Offer>() { @Override public void expire(Protos.OfferID key, Protos.Offer val) { driver.declineOffer( val.getId(), filters ); } } ); Number lruCacheSize = Optional.fromNullable((Number) _conf.get(CONF_MESOS_OFFER_LRU_CACHE_SIZE)).or(1000); final int intLruCacheSize = lruCacheSize.intValue(); _usedOffers = Collections.synchronizedMap(new LinkedHashMap<Protos.TaskID, Protos.Offer>(intLruCacheSize + 1, .75F, true) { public boolean removeEldestEntry(Map.Entry eldest) { return size() > intLruCacheSize; } }); Number offerExpired = Optional.fromNullable((Number) _conf.get(Config.NIMBUS_MONITOR_FREQ_SECS)).or(10); Number expiryMultiplier = Optional.fromNullable((Number) _conf.get(CONF_MESOS_OFFER_EXPIRY_MULTIPLIER)).or(2.5); _timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { try { synchronized (_offersLock) { _offers.rotate(); } } catch (Throwable t) { LOG.error("Received fatal error Halting process...", t); Runtime.getRuntime().halt(2); } } }, 0, Math.round(1000 * expiryMultiplier.doubleValue() * offerExpired.intValue())); }