Class InternalHistorianProvider.HistorianSyncable
- java.lang.Object
-
- com.inductiveautomation.gateway.tags.history.tsdb.localhistorian.InternalHistorianProvider.HistorianSyncable
-
- All Implemented Interfaces:
Syncable
,SyncSettings
- Enclosing class:
- InternalHistorianProvider
protected static class InternalHistorianProvider.HistorianSyncable extends java.lang.Object implements Syncable, SyncSettings
-
-
Constructor Summary
Constructors Constructor Description HistorianSyncable(GatewayContext context, java.lang.String pipelineName, HistorianSyncSource source, DataSink target, long syncTimeMS, Timeline schedule)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getExecutionDelayMS()
java.lang.String
getKey()
A key to uniquely identify this Syncable to theSyncManager
long
getLastSyncId()
Returns the syncid for the last data synced.Timeline
getSchedule()
int
getSyncableCount(long syncId)
Returns the number of data points that could be synchronized from the given point.SyncSettings
getSyncSettings()
Returns the sync settings used for sending data to remote systems.java.lang.String
getSyncType()
Returns the type of data this Syncable will store (e.g.boolean
isEnabled()
boolean
isScheduleEnabled()
void
setLastSyncId(long value)
Use to update the most recently synced id.void
shutdown()
void
startup()
SyncResult
sync(long syncId)
Return true if and only if data was successfully sent to the target
-
-
-
Constructor Detail
-
HistorianSyncable
public HistorianSyncable(GatewayContext context, java.lang.String pipelineName, HistorianSyncSource source, DataSink target, long syncTimeMS, Timeline schedule)
-
-
Method Detail
-
startup
public void startup()
-
shutdown
public void shutdown()
-
getKey
public java.lang.String getKey()
Description copied from interface:Syncable
A key to uniquely identify this Syncable to theSyncManager
-
getSyncType
public java.lang.String getSyncType()
Description copied from interface:Syncable
Returns the type of data this Syncable will store (e.g. historical, auditing, alarming).- Specified by:
getSyncType
in interfaceSyncable
-
getSyncableCount
public int getSyncableCount(long syncId)
Description copied from interface:Syncable
Returns the number of data points that could be synchronized from the given point.- Specified by:
getSyncableCount
in interfaceSyncable
-
sync
public SyncResult sync(long syncId)
Description copied from interface:Syncable
Return true if and only if data was successfully sent to the target
-
getSyncSettings
public SyncSettings getSyncSettings()
Description copied from interface:Syncable
Returns the sync settings used for sending data to remote systems.- Specified by:
getSyncSettings
in interfaceSyncable
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceSyncSettings
-
getExecutionDelayMS
public long getExecutionDelayMS()
- Specified by:
getExecutionDelayMS
in interfaceSyncSettings
-
getSchedule
@Nullable public Timeline getSchedule()
- Specified by:
getSchedule
in interfaceSyncSettings
-
isScheduleEnabled
public boolean isScheduleEnabled()
- Specified by:
isScheduleEnabled
in interfaceSyncSettings
-
getLastSyncId
public long getLastSyncId()
Description copied from interface:Syncable
Returns the syncid for the last data synced.- Specified by:
getLastSyncId
in interfaceSyncable
-
setLastSyncId
public void setLastSyncId(long value)
Description copied from interface:Syncable
Use to update the most recently synced id.- Specified by:
setLastSyncId
in interfaceSyncable
-
-