Last active
December 29, 2015 15:49
-
-
Save alalwww/7693440 to your computer and use it in GitHub Desktop.
抽象化
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class AbstractShachiku implements Runnable | |
{ | |
protected asbtract void work(); | |
@Override | |
public final void run() | |
{ | |
syukkin(); | |
} | |
private final void syukkin() | |
{ | |
try | |
{ | |
work(); | |
} | |
catch(RuntimeException ignore) | |
{ | |
run(); | |
} | |
kitaku(); | |
} | |
private final void kitaku() | |
{ | |
Thread.sleep(4 * 60 * 60 * 1000); | |
syukkin(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment