synchronized public static void addOrUpdateRequestAmount(String ip, String timestamp){
        Requests req;
        EntityManager manager = JPUtil.getInstance().getManager();
        manager.getTransaction().begin();
        try {
              req  = manager.createNamedQuery("Requests.findByIp", Requests.class).setParameter("ip", ip).getSingleResult();
              req.setRequestCount(req.getRequestCount()+1);
              req.setTimeLastRequest(timestamp);
              manager.merge(req);
            } catch (NoResultException ex) {
                req = new Requests(ip, 1, timestamp);
                manager.persist(req);
            }
        manager.getTransaction().commit();
    }