Class InternalDbSyncIdTracker
- java.lang.Object
-
- com.inductiveautomation.gateway.tags.history.tsdb.localhistorian.InternalDbSyncIdTracker
-
- All Implemented Interfaces:
SyncIdTracker
public class InternalDbSyncIdTracker extends java.lang.Object implements SyncIdTracker
This class tracks the last local historian id sync'd to remote systems. The value is keyed off of the provider name, the remote server name, and the remote provider name. Since the historians are local, we don't sync the storage through redundancy. If we start allowing sync of outside historians, this could get tricky and we'd probably need a different implementation. Also, we book keep the trackers in an interesting way to ensure that we never have two of them trying to read and store for the same row at a time.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InternalDbSyncIdTracker.SyncIdRecord
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getLastSyncId()
static InternalDbSyncIdTracker
getOrCreate(GatewayContext context, java.lang.String historyProvider, java.lang.String remoteServer, java.lang.String remoteProvider)
void
setLastSyncId(long value)
-
-
-
Method Detail
-
getOrCreate
public static InternalDbSyncIdTracker getOrCreate(GatewayContext context, java.lang.String historyProvider, java.lang.String remoteServer, java.lang.String remoteProvider) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getLastSyncId
public long getLastSyncId()
- Specified by:
getLastSyncId
in interfaceSyncIdTracker
-
setLastSyncId
public void setLastSyncId(long value)
- Specified by:
setLastSyncId
in interfaceSyncIdTracker
-
-