public class DataModelImpl extends ChangeDataModel
All entries are initialized with DataItemValue.DISCONNECTED
in order
to populate the caches. This will allow the background transfer to already
have data before changes came in.
executor
Constructor and Description |
---|
DataModelImpl(HiveSource hiveSource,
Set<MappingEntry> entries,
Properties hiveProperties,
InformationBean info,
Long flushDelay,
boolean supportBackgroundScan) |
Modifier and Type | Method and Description |
---|---|
protected BackgroundModel |
createBackgroundModel()
Create a BackgroundModel for this data model instance
|
protected ChangeModel |
createChangeModel()
Create a ChangeModel for this data model instance
|
protected WriteModel |
createWriteModel()
Create a WriteModel for this data model instance
|
protected com.google.common.util.concurrent.ListenableFuture<Void> |
disposeSubscription(DefaultSubscription subscription) |
protected void |
handleStateChanged(MappingEntry entry,
DataItemValue value,
boolean notify) |
protected WriteModel.Action |
prepareCommand(WriteModel.Request<Boolean> request) |
protected WriteModel.Action |
prepareSetpointFloat(WriteModel.Request<Float> request) |
protected WriteModel.Action |
prepareSetpointScaled(WriteModel.Request<Short> request) |
void |
start() |
Stopping |
stop() |
Subscription |
subscribe(DataListener listener) |
createBackgroundIterator, forAllAsdu, makeBufferingChangeModel, makeDefaultBackgroundModel, makeInstantChangeModel, notifyDataChange, performForAllAsdu, performRead, performReadAll, read, readAll, writeCommand, writeFloatValue, writeScaledValue
getNumberOfSubscriptions, notifyChangeBoolean, notifyChangeBoolean, notifyChangeFloat, notifyChangeFloat, notifyChangeShort, notifyChangeShort
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forAllAsdu
public DataModelImpl(HiveSource hiveSource, Set<MappingEntry> entries, Properties hiveProperties, InformationBean info, Long flushDelay, boolean supportBackgroundScan)
protected BackgroundModel createBackgroundModel()
ChangeDataModel
This method is called exactly once by the ChangeDataModel.start()
method
createBackgroundModel
in class ChangeDataModel
protected ChangeModel createChangeModel()
ChangeDataModel
This method is called exactly once by the ChangeDataModel.start()
method
createChangeModel
in class ChangeDataModel
protected WriteModel createWriteModel()
ChangeDataModel
This method is called exactly once by the ChangeDataModel.start()
method
createWriteModel
in class ChangeDataModel
public Subscription subscribe(DataListener listener)
subscribe
in interface DataModel
subscribe
in class AbstractBaseDataModel
protected com.google.common.util.concurrent.ListenableFuture<Void> disposeSubscription(DefaultSubscription subscription)
disposeSubscription
in class AbstractBaseDataModel
protected void handleStateChanged(MappingEntry entry, DataItemValue value, boolean notify)
public void start()
start
in interface DataModel
start
in class ChangeDataModel
public Stopping stop()
stop
in interface DataModel
stop
in class ChangeDataModel
protected WriteModel.Action prepareCommand(WriteModel.Request<Boolean> request)
protected WriteModel.Action prepareSetpointFloat(WriteModel.Request<Float> request)
protected WriteModel.Action prepareSetpointScaled(WriteModel.Request<Short> request)
Copyright © 2017 Eclipse NeoSCADA Project. All rights reserved.