public class OfflineRegion
extends java.lang.Object
OfflineManager.CreateOfflineRegionCallback
to create a new offline region.| Modifier and Type | Class and Description |
|---|---|
static interface |
OfflineRegion.DownloadState
A region is either inactive (not downloading, but previously-downloaded
resources are available for use), or active (resources are being downloaded
or will be downloaded, if necessary, when network access is available).
|
static interface |
OfflineRegion.OfflineRegionDeleteCallback
This callback receives an asynchronous response containing a notification when
an offline region has been deleted, or a
String error message otherwise. |
static interface |
OfflineRegion.OfflineRegionObserver
A region can have a single observer, which gets notified whenever a change
to the region's status occurs.
|
static interface |
OfflineRegion.OfflineRegionStatusCallback
This callback receives an asynchronous response containing the
OfflineRegionStatus
of the offline region, or a String error message otherwise. |
| Modifier and Type | Field and Description |
|---|---|
static int |
STATE_ACTIVE |
static int |
STATE_INACTIVE |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(OfflineRegion.OfflineRegionDeleteCallback callback)
Remove an offline region from the database and perform any resources evictions
necessary as a result.
|
protected void |
finalize() |
OfflineRegionDefinition |
getDefinition() |
long |
getID() |
byte[] |
getMetadata() |
void |
getStatus(OfflineRegion.OfflineRegionStatusCallback callback)
Retrieve the current status of the region.
|
boolean |
isDeliveringInactiveMessages()
Gets whether or not the `OfflineRegionObserver` will continue to deliver messages even if
the region state has been set as STATE_INACTIVE.
|
void |
setDeliverInactiveMessages(boolean deliverInactiveMessages)
When set true, the `OfflineRegionObserver` will continue to deliver messages even if
the region state has been set as STATE_INACTIVE (operations happen asynchronously).
|
void |
setDownloadState(int state)
Pause or resume downloading of regional resources.
|
void |
setObserver(OfflineRegion.OfflineRegionObserver observer)
Register an observer to be notified when the state of the region changes.
|
public static final int STATE_INACTIVE
public static final int STATE_ACTIVE
public boolean isDeliveringInactiveMessages()
public void setDeliverInactiveMessages(boolean deliverInactiveMessages)
public long getID()
public OfflineRegionDefinition getDefinition()
public byte[] getMetadata()
public void setObserver(OfflineRegion.OfflineRegionObserver observer)
public void setDownloadState(int state)
public void getStatus(OfflineRegion.OfflineRegionStatusCallback callback)
public void delete(OfflineRegion.OfflineRegionDeleteCallback callback)
protected void finalize()
finalize in class java.lang.Object