Y
Hacker News
new
|
ask
|
show
|
jobs
by
imtringued
2263 days ago
Usually you would just call your functions hibernate() and terminate(). That way you can call hibernate() on State<Running> but not on State<Terminated> or State<Hibernate>.