public class FHSyncConfig extends Object
| Constructor and Description |
|---|
FHSyncConfig() |
| Modifier and Type | Method and Description |
|---|---|
FHSyncConfig |
clone() |
static FHSyncConfig |
fromJSON(JSONObject pObj)
Creates a new configuration object from JSON.
|
int |
getCrashCountWait()
Gets the maximum crash count.
|
JSONObject |
getJSON()
Gets a JSON representation of the configuration object.
|
int |
getSyncFrequency()
Gets the current sync interval.
|
boolean |
isAutoSyncLocalUpdates()
Gets whether the sync client automatically updates on local changes.
|
boolean |
isNotifyClientStorageFailed()
Gets whether the sync client notifies on a client storage failed event.
|
boolean |
isNotifyDeltaReceived()
Gets whether the sync client notifies on a delta received event.
|
boolean |
isNotifyLocalUpdateApplied()
Gets whether the sync client notifies on a local updates applied event.
|
boolean |
isNotifyOfflineUpdate()
Gets whether the sync client notifies on an offline update event.
|
boolean |
isNotifyRemoteUpdateApplied()
Gets whether the sync client notifies on a remote update applied event.
|
boolean |
isNotifySyncCollisions()
Gets whether the sync client notifies on a sync collision event.
|
boolean |
isNotifySyncComplete()
Gets whether the sync client notifies on a sync complete event.
|
boolean |
isNotifySyncFailed()
Gets whether the sync client notifies on a sync failed event.
|
boolean |
isNotifySyncStarted()
Gets whether the sync client notifies on a sync start event.
|
boolean |
isNotifyUpdateFailed()
Gets whether the sync client notifies on an update failed event.
|
boolean |
isResendCrashedUpdates()
Gets whether changes should be re-submitted or abandoned when the crash limit is reached.
|
void |
setAutoSyncLocalUpdates(boolean mAutoSyncLocalUpdates)
Sets if the sync client should automatically update on local changes.
|
void |
setCrashCountWait(int mCrashCountWait)
Sets the maximum crash count number.
|
void |
setNotifyClientStorageFailed(boolean pNotifyClientStorageFailed)
Sets if the sync client should notify on a client storage failed event.
|
void |
setNotifyDeltaReceived(boolean pNotifyDeltaReceived)
Sets if the sync client should notify on a delta received event.
|
void |
setNotifyLocalUpdateApplied(boolean pNotifyLocalUpdateApplied)
Sets if the sync client should notify on a local updates applied event.
|
void |
setNotifyOfflineUpdate(boolean pNotifyOfflineUpdate)
Sets if the sync client should notify on an offline update event.
|
void |
setNotifyRemoteUpdateApplied(boolean pNotifyRemoteUpdateApplied)
Sets if the sync client should notify on a remote updates applied event.
|
void |
setNotifySyncCollisions(boolean pNotifySyncCollsion)
Sets if the sync client should notify on a sync collision event.
|
void |
setNotifySyncComplete(boolean pNotifySyncComplete)
Sets if the sync client should notify on a sync complete event.
|
void |
setNotifySyncFailed(boolean pNotifySyncFailed)
Sets if the sync client should notify on a sync failed event.
|
void |
setNotifySyncStarted(boolean pNotifySyncStarted)
Sets if the sync client should notify on a sync start event.
|
void |
setNotifyUpdateFailed(boolean pNotifyUpdateFailed)
Sets if the sync client should notify on an update failed event.
|
void |
setResendCrashedUpdates(boolean mResendCrashedUpdates)
Sets whether changes should be re-submitted once the crash limit is reached.
|
void |
setSyncFrequency(int pFrequencySeconds)
Sets the sync interval in seconds.
|
void |
setUseCustomSync(boolean mUseCustomSync)
Set if legacy mode is used
|
boolean |
useCustomSync()
Check if legacy mode is enabled
|
public void setSyncFrequency(int pFrequencySeconds)
pFrequencySeconds - the new sync intervalpublic int getSyncFrequency()
public boolean isNotifySyncStarted()
public void setNotifySyncStarted(boolean pNotifySyncStarted)
pNotifySyncStarted - whether to notify on sync startpublic boolean isNotifySyncComplete()
public void setNotifySyncComplete(boolean pNotifySyncComplete)
pNotifySyncComplete - whether to notify on sync completepublic boolean isNotifySyncCollisions()
public void setNotifySyncCollisions(boolean pNotifySyncCollsion)
pNotifySyncCollsion - whether to notify on sync collisionpublic boolean isNotifyOfflineUpdate()
public void setNotifyOfflineUpdate(boolean pNotifyOfflineUpdate)
pNotifyOfflineUpdate - whether to notify on offline updatepublic boolean isNotifyUpdateFailed()
public void setNotifyUpdateFailed(boolean pNotifyUpdateFailed)
pNotifyUpdateFailed - whether to notify on update failedpublic boolean isNotifyRemoteUpdateApplied()
public void setNotifyRemoteUpdateApplied(boolean pNotifyRemoteUpdateApplied)
pNotifyRemoteUpdateApplied - whether to notify on remote updates appliedpublic boolean isNotifyLocalUpdateApplied()
public void setNotifyLocalUpdateApplied(boolean pNotifyLocalUpdateApplied)
pNotifyLocalUpdateApplied - whether to notify on local updates appliedpublic boolean isNotifyDeltaReceived()
public void setNotifyDeltaReceived(boolean pNotifyDeltaReceived)
pNotifyDeltaReceived - whether to notify on delta receivedpublic boolean isNotifySyncFailed()
public void setNotifySyncFailed(boolean pNotifySyncFailed)
pNotifySyncFailed - whether to notify on sync failedpublic void setNotifyClientStorageFailed(boolean pNotifyClientStorageFailed)
pNotifyClientStorageFailed - whether to notify on client storage failedpublic boolean isNotifyClientStorageFailed()
public boolean isAutoSyncLocalUpdates()
public void setAutoSyncLocalUpdates(boolean mAutoSyncLocalUpdates)
mAutoSyncLocalUpdates - whether local changes should automatically syncpublic int getCrashCountWait()
public void setCrashCountWait(int mCrashCountWait)
mCrashCountWait - the crash limitpublic boolean isResendCrashedUpdates()
public void setResendCrashedUpdates(boolean mResendCrashedUpdates)
mResendCrashedUpdates - true or false.public void setUseCustomSync(boolean mUseCustomSync)
mUseCustomSync - public boolean useCustomSync()
public JSONObject getJSON()
public static FHSyncConfig fromJSON(JSONObject pObj)
pObj - the sync config JSONpublic FHSyncConfig clone()
Copyright © 2016 Red Hat. All rights reserved.