public abstract class RebootManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
RebootManager.PendingShutdownObserver
An interface for receiving notifications about pending automated shutdowns.
|
| Modifier and Type | Field and Description |
|---|---|
static int[] |
DEFAULT_WARNINGS
The default warning times.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addObserver(RebootManager.PendingShutdownObserver observer)
Add an observer to the observer list.
|
void |
allowReboot(int lockId)
Release a reboot lock.
|
void |
cancelReboot()
Cancel the currently scheduled reboot, if any.
|
int[] |
getWarnings()
Returns the minutes at which we give warnings.
|
void |
init()
Finishes initialization of the manager.
|
int |
preventReboot(String whereFrom)
Called by an entity that would like to prevent a reboot.
|
void |
scheduleReboot(long rebootTime,
String initiator)
Schedules a reboot for the specified time.
|
boolean |
scheduleRegularReboot()
Schedules our next regularly scheduled reboot.
|
boolean |
willShutdownSoon()
Is the manager planning a shutdown in the near future?
|
public void init()
public boolean scheduleRegularReboot()
public boolean willShutdownSoon()
public void addObserver(RebootManager.PendingShutdownObserver observer)
public void cancelReboot()
public void scheduleReboot(long rebootTime,
String initiator)
public int preventReboot(String whereFrom)
public void allowReboot(int lockId)
public int[] getWarnings()
Copyright © 2015. All rights reserved.