поверить не могу, уши вянут
Brad just asked Nick and Ross, have you heard of that Russian industrial designer that invented a keyboard with all the keys being displays?
public class Health {
private static Map<String, Runnable> todos = new ConcurrentHashMap<String, Runnable>();
public static void addChecker(String name, Runnable todo) {
todos.put(name, todo);
}
public static void removeChecker(String name) {
todos.remove(name);
}
public static void run(String name) {
Runnable todo = todos.get(name);
if (todo != null) todo.run();
}
public static void check(String name) {
try {
run("name");
Log.debug("Health check '%s' passed.", name);
} catch (RuntimeException re) {
Log.error("Health check '%s' failed.", name, re);
}
}
}
