blob: 9f6373d1303041e0318b2c223e810f481a6024fa [file] [log] [blame]
Jonathan Hart03102132014-07-01 23:22:04 -07001package net.onrc.onos.core.hostmanager;
Jonathan Hartd857ad62013-12-14 18:08:17 -08002
3import java.util.ArrayList;
4import java.util.Collection;
5import java.util.Date;
6import java.util.HashMap;
TeruU80ce5062014-03-03 17:16:13 -08007import java.util.HashSet;
Jonathan Hartd857ad62013-12-14 18:08:17 -08008import java.util.List;
9import java.util.Map;
TeruU80ce5062014-03-03 17:16:13 -080010import java.util.Set;
TeruUd1c5b652014-03-24 13:58:46 -070011import java.util.concurrent.CopyOnWriteArrayList;
TeruU80ce5062014-03-03 17:16:13 -080012import java.util.concurrent.Executors;
13import java.util.concurrent.ScheduledExecutorService;
14import java.util.concurrent.TimeUnit;
Jonathan Hartd857ad62013-12-14 18:08:17 -080015
16import net.floodlightcontroller.core.FloodlightContext;
17import net.floodlightcontroller.core.IFloodlightProviderService;
18import net.floodlightcontroller.core.IOFMessageListener;
19import net.floodlightcontroller.core.IOFSwitch;
20import net.floodlightcontroller.core.IUpdate;
21import net.floodlightcontroller.core.module.FloodlightModuleContext;
22import net.floodlightcontroller.core.module.FloodlightModuleException;
23import net.floodlightcontroller.core.module.IFloodlightModule;
24import net.floodlightcontroller.core.module.IFloodlightService;
Jonathan Hartd857ad62013-12-14 18:08:17 -080025import net.floodlightcontroller.util.MACAddress;
Jonathan Hartdeda0ba2014-04-03 11:14:12 -070026import net.onrc.onos.core.packet.Ethernet;
Jonathan Harte37e4e22014-05-13 19:12:02 -070027import net.onrc.onos.core.topology.ITopologyService;
TeruU5d2c9392014-06-09 20:02:02 -070028import net.onrc.onos.core.topology.Port;
Jonathan Harte37e4e22014-05-13 19:12:02 -070029import net.onrc.onos.core.topology.Topology;
Yuta HIGUCHI8f3dfa32014-06-25 00:14:25 -070030import net.onrc.onos.core.util.Dpid;
31import net.onrc.onos.core.util.PortNumber;
Jonathan Hartd857ad62013-12-14 18:08:17 -080032
Brian O'Connorc67f9fa2014-08-07 18:17:46 -070033import org.projectfloodlight.openflow.protocol.OFMessage;
34import org.projectfloodlight.openflow.protocol.OFPacketIn;
35import org.projectfloodlight.openflow.protocol.OFType;
TeruU80ce5062014-03-03 17:16:13 -080036import org.slf4j.Logger;
37import org.slf4j.LoggerFactory;
Jonathan Hartd857ad62013-12-14 18:08:17 -080038
Jonathan Hart03102132014-07-01 23:22:04 -070039public class HostManager implements IFloodlightModule,
Brian O'Connorc67f9fa2014-08-07 18:17:46 -070040IOFMessageListener,
41IHostService {
TeruU28adcc32014-04-15 17:57:35 -070042
Jonathan Hart03102132014-07-01 23:22:04 -070043 private static final Logger log = LoggerFactory.getLogger(HostManager.class);
44 private static final long HOST_CLEANING_INITIAL_DELAY = 30;
TeruU28adcc32014-04-15 17:57:35 -070045 private int cleanupSecondConfig = 60 * 60;
46 private int agingMillisecConfig = 60 * 60 * 1000;
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -070047
Jonathan Hart03102132014-07-01 23:22:04 -070048 private CopyOnWriteArrayList<IHostListener> hostListeners;
Ray Milkey269ffb92014-04-03 14:43:30 -070049 private IFloodlightProviderService floodlightProvider;
Jonathan Hart83ce8c42014-06-02 00:07:06 -070050 private static final ScheduledExecutorService EXECUTOR_SERVICE =
51 Executors.newSingleThreadScheduledExecutor();
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -070052
Jonathan Harte37e4e22014-05-13 19:12:02 -070053 private ITopologyService topologyService;
54 private Topology topology;
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -070055
Jonathan Hart03102132014-07-01 23:22:04 -070056 public enum HostUpdateType {
TeruU80ce5062014-03-03 17:16:13 -080057 ADD, DELETE, UPDATE;
58 }
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -070059
Jonathan Hart03102132014-07-01 23:22:04 -070060 private class HostUpdate implements IUpdate {
61 private final Host host;
62 private final HostUpdateType type;
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -070063
Jonathan Hart03102132014-07-01 23:22:04 -070064 public HostUpdate(Host host, HostUpdateType type) {
65 this.host = host;
Ray Milkey269ffb92014-04-03 14:43:30 -070066 this.type = type;
67 }
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -070068
Ray Milkey269ffb92014-04-03 14:43:30 -070069 @Override
70 public void dispatch() {
Jonathan Hart03102132014-07-01 23:22:04 -070071 if (type == HostUpdateType.ADD) {
72 for (IHostListener listener : hostListeners) {
73 listener.hostAdded(host);
Ray Milkey269ffb92014-04-03 14:43:30 -070074 }
Jonathan Hart03102132014-07-01 23:22:04 -070075 } else if (type == HostUpdateType.DELETE) {
76 for (IHostListener listener : hostListeners) {
77 listener.hostRemoved(host);
Ray Milkey269ffb92014-04-03 14:43:30 -070078 }
79 }
80 }
81 }
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -070082
Ray Milkey269ffb92014-04-03 14:43:30 -070083 @Override
84 public String getName() {
Jonathan Hart03102132014-07-01 23:22:04 -070085 return "hostmanager";
Ray Milkey269ffb92014-04-03 14:43:30 -070086 }
Jonathan Hartd857ad62013-12-14 18:08:17 -080087
Ray Milkey269ffb92014-04-03 14:43:30 -070088 @Override
89 public boolean isCallbackOrderingPrereq(OFType type, String name) {
90 // We want link discovery to consume LLDP first otherwise we'll
Jonathan Hart03102132014-07-01 23:22:04 -070091 // end up reading bad host info from LLDP packets
Ray Milkey269ffb92014-04-03 14:43:30 -070092 return type == OFType.PACKET_IN && "linkdiscovery".equals(name);
93 }
Jonathan Hartd857ad62013-12-14 18:08:17 -080094
Ray Milkey269ffb92014-04-03 14:43:30 -070095 @Override
96 public boolean isCallbackOrderingPostreq(OFType type, String name) {
97 return type == OFType.PACKET_IN &&
98 ("proxyarpmanager".equals(name) || "onosforwarding".equals(name));
99 }
Jonathan Hartd857ad62013-12-14 18:08:17 -0800100
Ray Milkey269ffb92014-04-03 14:43:30 -0700101 @Override
102 public Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx) {
Pavlin Radoslavov0b88a262014-04-10 15:43:27 -0700103 if (msg.getType().equals(OFType.PACKET_IN) &&
Patrick Liuab1e6062014-05-05 11:12:13 -0700104 (msg instanceof OFPacketIn)) {
Ray Milkey269ffb92014-04-03 14:43:30 -0700105 OFPacketIn pi = (OFPacketIn) msg;
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -0700106
Ray Milkey269ffb92014-04-03 14:43:30 -0700107 Ethernet eth = IFloodlightProviderService.bcStore.
108 get(cntx, IFloodlightProviderService.CONTEXT_PI_PAYLOAD);
Brian O'Connorc67f9fa2014-08-07 18:17:46 -0700109 short inport = (short) cntx.getStorage()
110 .get(IFloodlightProviderService.CONTEXT_PI_INPORT);
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -0700111
Brian O'Connorc67f9fa2014-08-07 18:17:46 -0700112 return processPacketIn(sw, pi, eth, inport);
Ray Milkey269ffb92014-04-03 14:43:30 -0700113 }
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -0700114
Ray Milkey269ffb92014-04-03 14:43:30 -0700115 return Command.CONTINUE;
116 }
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -0700117
Jonathan Hart83ce8c42014-06-02 00:07:06 -0700118 // This "protected" modifier is for unit test.
119 // The above "receive" method couldn't be tested
120 // because of IFloodlightProviderService static final field.
Brian O'Connorc67f9fa2014-08-07 18:17:46 -0700121 protected Command processPacketIn(IOFSwitch sw, OFPacketIn pi, Ethernet eth,
122 short inport) {
TeruU5d2c9392014-06-09 20:02:02 -0700123 if (log.isTraceEnabled()) {
124 log.trace("Receive PACKET_IN swId {}, portId {}", sw.getId(), pi.getInPort());
125 }
126
Yuta HIGUCHI8f3dfa32014-06-25 00:14:25 -0700127 final Dpid dpid = new Dpid(sw.getId());
Brian O'Connorc67f9fa2014-08-07 18:17:46 -0700128 final PortNumber portNum = new PortNumber(inport);
TeruU80ce5062014-03-03 17:16:13 -0800129
Jonathan Hart03102132014-07-01 23:22:04 -0700130 Host srcHost =
131 getSourceHostFromPacket(eth, dpid.value(), portNum.value());
TeruU80ce5062014-03-03 17:16:13 -0800132
Jonathan Hart03102132014-07-01 23:22:04 -0700133 if (srcHost == null) {
Ray Milkey269ffb92014-04-03 14:43:30 -0700134 return Command.STOP;
TeruU80ce5062014-03-03 17:16:13 -0800135 }
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -0700136
Jonathan Hart03102132014-07-01 23:22:04 -0700137 // If the switch port we try to attach a new host already has a link,
138 // then don't add the host
Jonathan Hart83ce8c42014-06-02 00:07:06 -0700139 // TODO We probably don't need to check this here, it should be done in
140 // the Topology module.
TeruU5d2c9392014-06-09 20:02:02 -0700141 topology.acquireReadLock();
142 try {
Yuta HIGUCHI8f3dfa32014-06-25 00:14:25 -0700143 if (topology.getOutgoingLink(dpid, portNum) != null ||
144 topology.getIncomingLink(dpid, portNum) != null) {
Jonathan Hart03102132014-07-01 23:22:04 -0700145 log.debug("Not adding host {} as " +
Brian O'Connorc67f9fa2014-08-07 18:17:46 -0700146 "there is a link on the port: dpid {} port {}",
147 srcHost.getMacAddress(), dpid, portNum);
TeruU5d2c9392014-06-09 20:02:02 -0700148 return Command.CONTINUE;
Ray Milkey269ffb92014-04-03 14:43:30 -0700149 }
TeruU5d2c9392014-06-09 20:02:02 -0700150 } finally {
151 topology.releaseReadLock();
TeruU80ce5062014-03-03 17:16:13 -0800152 }
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -0700153
Ray Milkey92897212014-07-21 10:33:16 -0700154 Long mac = eth.getSourceMAC().toLong();
Jonathan Hart03102132014-07-01 23:22:04 -0700155 addHost(mac, srcHost);
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -0700156
Ray Milkey269ffb92014-04-03 14:43:30 -0700157 if (log.isTraceEnabled()) {
Jonathan Hart03102132014-07-01 23:22:04 -0700158 log.trace("Add host info: {}", srcHost);
TeruU80ce5062014-03-03 17:16:13 -0800159 }
Jonathan Hartd857ad62013-12-14 18:08:17 -0800160 return Command.CONTINUE;
Ray Milkey269ffb92014-04-03 14:43:30 -0700161 }
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -0700162
Jonathan Hart03102132014-07-01 23:22:04 -0700163 // Thread to delete hosts periodically.
164 // Remove all hosts from the map first and then finally delete hosts
Jonathan Hart83ce8c42014-06-02 00:07:06 -0700165 // from the DB.
166
Jonathan Hart03102132014-07-01 23:22:04 -0700167 // TODO This should be sharded based on host 'owner' (i.e. the instance
Jonathan Hart83ce8c42014-06-02 00:07:06 -0700168 // that owns the switch it is attached to). Currently any instance can
Jonathan Hart03102132014-07-01 23:22:04 -0700169 // issue deletes for any host, which permits race conditions and could
Jonathan Hart83ce8c42014-06-02 00:07:06 -0700170 // cause the Topology replicas to diverge.
Jonathan Hart03102132014-07-01 23:22:04 -0700171 private class HostCleaner implements Runnable {
Ray Milkey269ffb92014-04-03 14:43:30 -0700172 @Override
173 public void run() {
Jonathan Hart03102132014-07-01 23:22:04 -0700174 log.debug("called HostCleaner");
TeruU5d2c9392014-06-09 20:02:02 -0700175 topology.acquireReadLock();
Ray Milkey269ffb92014-04-03 14:43:30 -0700176 try {
Yuta HIGUCHIbfc77f02014-07-14 22:50:25 -0700177 Set<net.onrc.onos.core.topology.Host> deleteSet = new HashSet<>();
178 for (net.onrc.onos.core.topology.Host host : topology.getHosts()) {
TeruU5d2c9392014-06-09 20:02:02 -0700179 long now = System.currentTimeMillis();
Jonathan Hart03102132014-07-01 23:22:04 -0700180 if ((now - host.getLastSeenTime() > agingMillisecConfig)) {
Ray Milkey269ffb92014-04-03 14:43:30 -0700181 if (log.isTraceEnabled()) {
Jonathan Hart03102132014-07-01 23:22:04 -0700182 log.trace("Removing host info: mac {}, now {}, lastSeenTime {}, diff {}",
183 host.getMacAddress(), now, host.getLastSeenTime(), now - host.getLastSeenTime());
Ray Milkey269ffb92014-04-03 14:43:30 -0700184 }
Jonathan Hart03102132014-07-01 23:22:04 -0700185 deleteSet.add(host);
Ray Milkey269ffb92014-04-03 14:43:30 -0700186 }
187 }
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -0700188
Yuta HIGUCHIbfc77f02014-07-14 22:50:25 -0700189 for (net.onrc.onos.core.topology.Host host : deleteSet) {
Jonathan Hart03102132014-07-01 23:22:04 -0700190 deleteHostByMac(host.getMacAddress());
Ray Milkey269ffb92014-04-03 14:43:30 -0700191 }
192 } catch (Exception e) {
Jonathan Hart83ce8c42014-06-02 00:07:06 -0700193 // Any exception thrown by the task will prevent the Executor
194 // from running the next iteration, so we need to catch and log
195 // all exceptions here.
Jonathan Hart03102132014-07-01 23:22:04 -0700196 log.error("Exception in host cleanup thread:", e);
TeruU5d2c9392014-06-09 20:02:02 -0700197 } finally {
198 topology.releaseReadLock();
Ray Milkey269ffb92014-04-03 14:43:30 -0700199 }
200 }
201 }
TeruU80ce5062014-03-03 17:16:13 -0800202
Jonathan Hartd857ad62013-12-14 18:08:17 -0800203 /**
Jonathan Hart03102132014-07-01 23:22:04 -0700204 * Parse a host from an {@link Ethernet} packet.
Ray Milkey269ffb92014-04-03 14:43:30 -0700205 *
Jonathan Hartd857ad62013-12-14 18:08:17 -0800206 * @param eth the packet to parse
Jonathan Hart83ce8c42014-06-02 00:07:06 -0700207 * @param swdpid the switch on which the packet arrived
208 * @param port the port on which the packet arrived
Jonathan Hart03102132014-07-01 23:22:04 -0700209 * @return the host from the packet
Jonathan Hartd857ad62013-12-14 18:08:17 -0800210 */
Jonathan Hart03102132014-07-01 23:22:04 -0700211 protected Host getSourceHostFromPacket(Ethernet eth,
212 long swdpid, long port) {
Jonathan Hart7ab71612014-05-27 13:37:31 -0700213 MACAddress sourceMac = eth.getSourceMAC();
Jonathan Hartd857ad62013-12-14 18:08:17 -0800214
Jonathan Hart7ab71612014-05-27 13:37:31 -0700215 // Ignore broadcast/multicast source
216 if (sourceMac.isBroadcast() || sourceMac.isBroadcast()) {
Jonathan Hartd857ad62013-12-14 18:08:17 -0800217 return null;
Ray Milkeyb29e6262014-04-09 16:02:14 -0700218 }
Jonathan Hartd857ad62013-12-14 18:08:17 -0800219
220 short vlan = eth.getVlanID();
Jonathan Hart03102132014-07-01 23:22:04 -0700221 return new Host(sourceMac,
Ray Milkey269ffb92014-04-03 14:43:30 -0700222 ((vlan >= 0) ? vlan : null),
Ray Milkey269ffb92014-04-03 14:43:30 -0700223 swdpid,
224 port,
225 new Date());
Jonathan Hartd857ad62013-12-14 18:08:17 -0800226 }
227
Ray Milkey269ffb92014-04-03 14:43:30 -0700228 @Override
229 public Collection<Class<? extends IFloodlightService>> getModuleServices() {
230 List<Class<? extends IFloodlightService>> services =
231 new ArrayList<Class<? extends IFloodlightService>>();
Jonathan Hart03102132014-07-01 23:22:04 -0700232 services.add(IHostService.class);
Ray Milkey269ffb92014-04-03 14:43:30 -0700233 return services;
234 }
Jonathan Hartd857ad62013-12-14 18:08:17 -0800235
TeruUd1c5b652014-03-24 13:58:46 -0700236 @Override
Ray Milkey269ffb92014-04-03 14:43:30 -0700237 public Map<Class<? extends IFloodlightService>, IFloodlightService> getServiceImpls() {
238 Map<Class<? extends IFloodlightService>, IFloodlightService> impls =
239 new HashMap<Class<? extends IFloodlightService>, IFloodlightService>();
Jonathan Hart03102132014-07-01 23:22:04 -0700240 impls.put(IHostService.class, this);
Ray Milkey269ffb92014-04-03 14:43:30 -0700241 return impls;
242 }
243
TeruUd1c5b652014-03-24 13:58:46 -0700244 @Override
Ray Milkey269ffb92014-04-03 14:43:30 -0700245 public Collection<Class<? extends IFloodlightService>> getModuleDependencies() {
246 List<Class<? extends IFloodlightService>> dependencies =
247 new ArrayList<Class<? extends IFloodlightService>>();
248 dependencies.add(IFloodlightProviderService.class);
Jonathan Harte37e4e22014-05-13 19:12:02 -0700249 dependencies.add(ITopologyService.class);
Ray Milkey269ffb92014-04-03 14:43:30 -0700250 return dependencies;
251 }
Yuta HIGUCHIe7eac182014-03-19 19:18:30 -0700252
Ray Milkey269ffb92014-04-03 14:43:30 -0700253 @Override
254 public void init(FloodlightModuleContext context)
255 throws FloodlightModuleException {
256 floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
Jonathan Hart03102132014-07-01 23:22:04 -0700257 hostListeners = new CopyOnWriteArrayList<IHostListener>();
Jonathan Harte37e4e22014-05-13 19:12:02 -0700258 topologyService = context.getServiceImpl(ITopologyService.class);
259 topology = topologyService.getTopology();
TeruU28adcc32014-04-15 17:57:35 -0700260
Jonathan Hart03102132014-07-01 23:22:04 -0700261 setHostManagerProperties(context);
Ray Milkey269ffb92014-04-03 14:43:30 -0700262 }
TeruU80ce5062014-03-03 17:16:13 -0800263
Ray Milkey269ffb92014-04-03 14:43:30 -0700264 @Override
265 public void startUp(FloodlightModuleContext context) {
266 floodlightProvider.addOFMessageListener(OFType.PACKET_IN, this);
Jonathan Hart03102132014-07-01 23:22:04 -0700267 EXECUTOR_SERVICE.scheduleAtFixedRate(new HostCleaner(),
268 HOST_CLEANING_INITIAL_DELAY, cleanupSecondConfig, TimeUnit.SECONDS);
Ray Milkey269ffb92014-04-03 14:43:30 -0700269 }
TeruUd1c5b652014-03-24 13:58:46 -0700270
Ray Milkey269ffb92014-04-03 14:43:30 -0700271 @Override
Jonathan Hart03102132014-07-01 23:22:04 -0700272 public void deleteHost(Host host) {
Jonathan Hart83ce8c42014-06-02 00:07:06 -0700273 floodlightProvider.publishUpdate(
Jonathan Hart03102132014-07-01 23:22:04 -0700274 new HostUpdate(host, HostUpdateType.DELETE));
Ray Milkey269ffb92014-04-03 14:43:30 -0700275 }
TeruUd1c5b652014-03-24 13:58:46 -0700276
Ray Milkey269ffb92014-04-03 14:43:30 -0700277 @Override
Jonathan Hart03102132014-07-01 23:22:04 -0700278 public void deleteHostByMac(MACAddress mac) {
279 Host deleteHost = null;
TeruU5d2c9392014-06-09 20:02:02 -0700280 topology.acquireReadLock();
281 try {
Yuta HIGUCHIbfc77f02014-07-14 22:50:25 -0700282 net.onrc.onos.core.topology.Host host = topology.getHostByMac(mac);
TeruU5d2c9392014-06-09 20:02:02 -0700283
Jonathan Hart03102132014-07-01 23:22:04 -0700284 for (Port switchPort : host.getAttachmentPoints()) {
TeruU5d2c9392014-06-09 20:02:02 -0700285 // We don't handle vlan now and multiple attachment points.
Jonathan Hart03102132014-07-01 23:22:04 -0700286 deleteHost = new Host(host.getMacAddress(),
TeruU5d2c9392014-06-09 20:02:02 -0700287 null,
Yuta HIGUCHI8f3dfa32014-06-25 00:14:25 -0700288 switchPort.getDpid().value(),
Yuta HIGUCHI9da3a6e2014-06-10 22:11:58 -0700289 switchPort.getNumber().value(),
Jonathan Hart03102132014-07-01 23:22:04 -0700290 new Date(host.getLastSeenTime()));
Ray Milkey92897212014-07-21 10:33:16 -0700291 // FIXME: remove NOPMD flag after multiple attachment points are implemented
292 break; // NOPMD
TeruU5d2c9392014-06-09 20:02:02 -0700293 }
294 } finally {
295 topology.releaseReadLock();
296 }
297
Jonathan Hart03102132014-07-01 23:22:04 -0700298 if (deleteHost != null) {
299 deleteHost(deleteHost);
TeruU5d2c9392014-06-09 20:02:02 -0700300 }
Ray Milkey269ffb92014-04-03 14:43:30 -0700301 }
302
303 @Override
Jonathan Hart03102132014-07-01 23:22:04 -0700304 public void addHost(Long mac, Host host) {
Jonathan Hart83ce8c42014-06-02 00:07:06 -0700305 floodlightProvider.publishUpdate(
Jonathan Hart03102132014-07-01 23:22:04 -0700306 new HostUpdate(host, HostUpdateType.ADD));
Ray Milkey269ffb92014-04-03 14:43:30 -0700307 }
308
309 @Override
Jonathan Hart03102132014-07-01 23:22:04 -0700310 public void addHostListener(IHostListener listener) {
311 hostListeners.add(listener);
Ray Milkey269ffb92014-04-03 14:43:30 -0700312 }
313
314 @Override
Jonathan Hart03102132014-07-01 23:22:04 -0700315 public void removeHostListener(IHostListener listener) {
316 hostListeners.remove(listener);
Ray Milkey269ffb92014-04-03 14:43:30 -0700317 }
TeruU28adcc32014-04-15 17:57:35 -0700318
Jonathan Hart03102132014-07-01 23:22:04 -0700319 private void setHostManagerProperties(FloodlightModuleContext context) {
TeruU28adcc32014-04-15 17:57:35 -0700320 Map<String, String> configOptions = context.getConfigParams(this);
321 String cleanupsec = configOptions.get("cleanupsec");
322 String agingmsec = configOptions.get("agingmsec");
323 if (cleanupsec != null) {
324 cleanupSecondConfig = Integer.parseInt(cleanupsec);
325 log.debug("CLEANUP_SECOND is set to {}", cleanupSecondConfig);
326 }
327
328 if (agingmsec != null) {
329 agingMillisecConfig = Integer.parseInt(agingmsec);
330 log.debug("AGEING_MILLSEC is set to {}", agingMillisecConfig);
331 }
332 }
Jonathan Hartd857ad62013-12-14 18:08:17 -0800333}