List of usage examples for org.apache.commons.collections MapUtils getLongValue
public static long getLongValue(final Map map, final Object key, long defaultValue)
From source file:net.me2day.async.processor.sample.DummyDistributableEventProcessor.java
@Override public void initializeCompleted(Scope scope, Map<String, Object> configurationMap) { if (!ticket.equals(scope.getTarget())) { return;/* w w w. j ava 2 s.c o m*/ } int percentage = MapUtils.getIntValue(configurationMap, "failPercentage", 10); if (percentage > 100) { percentage = 100; } configurationMap.put("failPercentage", percentage); long time = MapUtils.getLongValue(configurationMap, "sleepTime", 100); configurationMap.put("sleepTime", time); failPercentage = percentage; sleepTime = time; }