public synchronized boolean isRateLimited(String remoteIP) { Date now = new Date(); Date d = (Date)rateLimited.get(remoteIP); rateLimited.put(remoteIP, now); if (d == null)
public synchronized boolean isRateLimited(RemoteClient remoteC){ String remoteIP = remoteC.getRemoteIP(); RemoteClient r = (RemoteClient)rateLimited.get(remoteIP); rateLimited.put(remoteIP, remoteC); if (r == null)
    public synchronized boolean isRateLimited(String remoteIP) {        Date now = new Date();        Date d = (Date)rateLimited.get(remoteIP);        rateLimited.put(remoteIP, now);        if (d == null)            return false;        return now.getTime() - d.getTime() <= MILLIS_PER_HOUR;    }