Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.feedhenry.sdk.sync
Class FHSyncConfig

    java.lang.Object
      com.feedhenry.sdk.sync.FHSyncConfig

    public class FHSyncConfig

extends java.lang.Object

The configuration options for the sync framework.

Constructor Summary
`FHSyncConfig()`

Method Summary
`FHSyncConfig` | `clone()`
`static FHSyncConfig` | `fromJSON(JSONObject pObj)` Create a new configuration object from JSON.
`int` | `getCrashCountWait()` Get the maximum crash count.
`JSONObject` | `getJSON()` JSON representation of the configuration object
`int` | `getSyncFrequency()` Get the current sync interval
`boolean` | `isAutoSyncLocalUpdates()` Does the sync client automatically update local changes
`boolean` | `isNotifyClientStorageFailed()` Does the sync client notify client storage failed event
`boolean` | `isNotifyDeltaReceived()` Does the sync client notify delta received event
`boolean` | `isNotifyLocalUpdateApplied()` Does the sync client notify local updates applied event
`boolean` | `isNotifyOfflineUpdate()` Does the sync client notify offline update event
`boolean` | `isNotifyRemoteUpdateApplied()` Does the sync client notify remote updates applied event
`boolean` | `isNotifySyncCollisions()` Does the sync client notify sync collision event
`boolean` | `isNotifySyncComplete()` Does the sync client notify sync complete event
`boolean` | `isNotifySyncFailed()` Does the sync client notify sync failed event
`boolean` | `isNotifySyncStarted()` Does the sync client notify sync start event
`boolean` | `isNotifyUpdateFailed()` Does the sync client notify update failed event
`boolean` | `isResendCrashedUpdates()` If the crash limit is reached, should the changes be re-submitted or abandoned.
`void` | `setAutoSyncLocalUpdates(boolean mAutoSyncLocalUpdates)` Set if the sync client should automatically update local changes
`void` | `setCrashCountWait(int mCrashCountWait)` Set the maximum crash count number.
`void` | `setNotifyClientStorageFailed(boolean pNotifyClientStorageFailed)` Set if the sync client should notify client storage failed event
`void` | `setNotifyDeltaReceived(boolean pNotifyDeltaReceived)` Set if the sync client should notify delta received event
`void` | `setNotifyLocalUpdateApplied(boolean pNotifyLocalUpdateApplied)` Set if the sync client should notify local updates applied event
`void` | `setNotifyOfflineUpdate(boolean pNotifyOfflineUpdate)` Set if the sync client notify offline update event.
`void` | `setNotifyRemoteUpdateApplied(boolean pNotifyRemoteUpdateApplied)` Set if the sync client should notify remote updates applied event
`void` | `setNotifySyncCollisions(boolean pNotifySyncCollsion)` Set if the sync client should notify sync collision event
`void` | `setNotifySyncComplete(boolean pNotifySyncComplete)` Set if the sync client should notify complete event
`void` | `setNotifySyncFailed(boolean pNotifySyncFailed)` Set if the sync client should notify sync failed event
`void` | `setNotifySyncStarted(boolean pNotifySyncStarted)` Set if the sync client should notify start event
`void` | `setNotifyUpdateFailed(boolean pNotifyUpdateFailed)` Set if the sync client should notify update failed event
`void` | `setResendCrashedUpdates(boolean mResendCrashedUpdates)` If this is set to true, crashed changes will be re-submitted if crash count limit is reached, otherwise they will be abandoned.
`void` | `setSyncFrequency(int pFrequency)` Set the sync interval.

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FHSyncConfig

    public FHSyncConfig()

Method Detail

### setSyncFrequency

    public void setSyncFrequency(int pFrequency)

  Set the sync interval. In seconds.

  Parameters:
    `pFrequency` - the new sync interval

### getSyncFrequency

    public int getSyncFrequency()

  Get the current sync interval

  Returns:
    the current sync interval.

### isNotifySyncStarted

    public boolean isNotifySyncStarted()

  Does the sync client notify sync start event

  Returns:
    true or false

### setNotifySyncStarted

    public void setNotifySyncStarted(boolean pNotifySyncStarted)

  Set if the sync client should notify start event

  Parameters:
    `pNotifySyncStarted` - true or false

### isNotifySyncComplete

    public boolean isNotifySyncComplete()

  Does the sync client notify sync complete event

  Returns:
    true or false

### setNotifySyncComplete

    public void setNotifySyncComplete(boolean pNotifySyncComplete)

  Set if the sync client should notify complete event

  Parameters:
    `pNotifySyncComplete` - true or false

### isNotifySyncCollisions

    public boolean isNotifySyncCollisions()

  Does the sync client notify sync collision event

  Returns:
    true or false

### setNotifySyncCollisions

    public void setNotifySyncCollisions(boolean pNotifySyncCollsion)

  Set if the sync client should notify sync collision event

  Parameters:
    `pNotifySyncCollsion` - true or false

### isNotifyOfflineUpdate

    public boolean isNotifyOfflineUpdate()

  Does the sync client notify offline update event

  Returns:
    true or false

### setNotifyOfflineUpdate

    public void setNotifyOfflineUpdate(boolean pNotifyOfflineUpdate)

  Set if the sync client notify offline update event.

  Parameters:
    `pNotifyOfflineUpdate` - true of false

### isNotifyUpdateFailed

    public boolean isNotifyUpdateFailed()

  Does the sync client notify update failed event

  Returns:
    true or false

### setNotifyUpdateFailed

    public void setNotifyUpdateFailed(boolean pNotifyUpdateFailed)

  Set if the sync client should notify update failed event

  Parameters:
    `pNotifyUpdateFailed` - true or false

### isNotifyRemoteUpdateApplied

    public boolean isNotifyRemoteUpdateApplied()

  Does the sync client notify remote updates applied event

  Returns:
    true or false

### setNotifyRemoteUpdateApplied

    public void setNotifyRemoteUpdateApplied(boolean pNotifyRemoteUpdateApplied)

  Set if the sync client should notify remote updates applied event

  Parameters:
    `pNotifyRemoteUpdateApplied` - true or false

### isNotifyLocalUpdateApplied

    public boolean isNotifyLocalUpdateApplied()

  Does the sync client notify local updates applied event

  Returns:
    true or false

### setNotifyLocalUpdateApplied

    public void setNotifyLocalUpdateApplied(boolean pNotifyLocalUpdateApplied)

  Set if the sync client should notify local updates applied event

  Parameters:
    `pNotifyLocalUpdateApplied` - true or false

### isNotifyDeltaReceived

    public boolean isNotifyDeltaReceived()

  Does the sync client notify delta received event

  Returns:
    true or false

### setNotifyDeltaReceived

    public void setNotifyDeltaReceived(boolean pNotifyDeltaReceived)

  Set if the sync client should notify delta received event

  Parameters:
    `pNotifyDeltaReceived` - true or false

### isNotifySyncFailed

    public boolean isNotifySyncFailed()

  Does the sync client notify sync failed event

  Returns:
    true or false

### setNotifySyncFailed

    public void setNotifySyncFailed(boolean pNotifySyncFailed)

  Set if the sync client should notify sync failed event

  Parameters:
    `pNotifySyncFailed` - true or false

### setNotifyClientStorageFailed

    public void setNotifyClientStorageFailed(boolean pNotifyClientStorageFailed)

  Set if the sync client should notify client storage failed event

  Parameters:
    `pNotifyClientStorageFailed` - true or false

### isNotifyClientStorageFailed

    public boolean isNotifyClientStorageFailed()

  Does the sync client notify client storage failed event

  Returns:

### isAutoSyncLocalUpdates

    public boolean isAutoSyncLocalUpdates()

  Does the sync client automatically update local changes

  Returns:
    true or false

### setAutoSyncLocalUpdates

    public void setAutoSyncLocalUpdates(boolean mAutoSyncLocalUpdates)

  Set if the sync client should automatically update local changes

  Parameters:
    `mAutoSyncLocalUpdates` - true of false

### getCrashCountWait

    public int getCrashCountWait()

  Get the maximum crash count.

  Returns:
    the maximum crash count number

### setCrashCountWait

    public void setCrashCountWait(int mCrashCountWait)

  Set the maximum crash count number. Changes may fail to be applied(crash) due to various reasons (network issue for example). If the crash count reaches this limit, the changes will be either re-submitted or abandoned.

  Parameters:
    `mCrashCountWait` - the crash limit

### isResendCrashedUpdates

    public boolean isResendCrashedUpdates()

  If the crash limit is reached, should the changes be re-submitted or abandoned.

  Returns:
    true or false

### setResendCrashedUpdates

    public void setResendCrashedUpdates(boolean mResendCrashedUpdates)

  If this is set to true, crashed changes will be re-submitted if crash count limit is reached, otherwise they will be abandoned.

  Parameters:
    `mResendCrashedUpdates` - true or false.

### getJSON

    public JSONObject getJSON()

  JSON representation of the configuration object

  Returns:
    The JSON object

### fromJSON

    public static FHSyncConfig fromJSON(JSONObject pObj)

  Create a new configuration object from JSON.

  Parameters:
    `pObj` - the sync config JSON
  Returns:
    the new sync config object

### clone

    public FHSyncConfig clone()

  Overrides:
    `clone` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD