Creating an in-memory ViewCounter that commits to database every 10 minutes
This method is broken in two ways. First, multiple threads can access the counter at the same time, and based on ordering, you may lose some updates. Second, if the counter is being created for the first time by multiple threads, you may create the counter multiple times.

public void incrementViewCount(Integer routeId) {
    if (viewCounter.containsKey(routeId)) {
        Integer counter = viewCounter.get(routeId);
        counter++;
        viewCounter.put(routeId, counter);
    } else {
        viewCounter.put(routeId, 1);
    }
}


In addition, you are not clear()ing the map in a thread-safe way. You should strongly consider an existing counter class, like Guava's AtomicLongMap. Writing a thread-safe counter is surprisingly non-trivial.