public void commitLogEntries(int result) { Iterator<Map.Entry<String, JRadiusLogEntry>> it = logEntryMap.entrySet().iterator(); long now = new Date().getTime(); long threshold = 180; while (it.hasNext()) { Map.Entry<String, JRadiusLogEntry> mapEntry = it.next(); JRadiusLogEntry entry = mapEntry.getValue(); if (entry.isFinished() && !entry.isCommitted()) { entry.setCode(new Integer(result)); commitLogEntry(entry, result); entry.setCommitted(true); } if (entry.getLastUpdate().getTime() < (now - threshold)) { it.remove(); } } }
public void commitLogEntries(int result) { Iterator<Map.Entry<String, JRadiusLogEntry>> it = logEntryMap.entrySet().iterator(); long now = new Date().getTime(); long threshold = 180; while (it.hasNext()) { Map.Entry<String, JRadiusLogEntry> mapEntry = it.next(); JRadiusLogEntry entry = mapEntry.getValue(); if (entry.isFinished() && !entry.isCommitted()) { entry.setCode(new Integer(result)); commitLogEntry(entry, result); entry.setCommitted(true); } if (entry.getLastUpdate().getTime() < (now - threshold)) { it.remove(); } } }
public void commitLogEntries(int result) { Iterator<Map.Entry<String, JRadiusLogEntry>> it = logEntryMap.entrySet().iterator(); long now = new Date().getTime(); long threshold = 180; while (it.hasNext()) { Map.Entry<String, JRadiusLogEntry> mapEntry = it.next(); JRadiusLogEntry entry = mapEntry.getValue(); if (entry.isFinished() && !entry.isCommitted()) { entry.setCode(new Integer(result)); commitLogEntry(entry, result); entry.setCommitted(true); } if (entry.getLastUpdate().getTime() < (now - threshold)) { it.remove(); } } }
public JRadiusLogEntry getLogEntry(JRadiusRequest request) throws RadiusException { AttributeList ci = request.getConfigItems(); RadiusAttribute a = ci.get(Attr_JRadiusRequestId.TYPE); String key; if (a != null) key = (String)a.getValue().getValueObject(); else key = Integer.toString((char)request.getRequestPacket().getIdentifier()); JRadiusLogEntry entry = getLogEntry(request, key); entry.setCode(new Integer(request.getReturnValue())); return entry; }
public JRadiusLogEntry getLogEntry(JRadiusRequest request) throws RadiusException { AttributeList ci = request.getConfigItems(); RadiusAttribute a = ci.get(Attr_JRadiusRequestId.TYPE); String key; if (a != null) key = (String)a.getValue().getValueObject(); else key = Integer.toString((char)request.getRequestPacket().getIdentifier()); JRadiusLogEntry entry = getLogEntry(request, key); entry.setCode(new Integer(request.getReturnValue())); return entry; }
public JRadiusLogEntry getLogEntry(JRadiusRequest request) throws RadiusException { AttributeList ci = request.getConfigItems(); RadiusAttribute a = ci.get(Attr_JRadiusRequestId.TYPE); String key; if (a != null) key = (String)a.getValue().getValueObject(); else key = Integer.toString((char)request.getRequestPacket().getIdentifier()); JRadiusLogEntry entry = getLogEntry(request, key); entry.setCode(new Integer(request.getReturnValue())); return entry; }