use of com.serotonin.m2m2.rt.PublishedPointGroupInitializer in project ma-core-public by MangoAutomation.
the class PublisherRT method initializePoints.
/**
* The {@link PublishedPointGroupInitializer} calls
* {@link RuntimeManager#startPublishedPoint(PublishedPointVO) startPublishedPoint()}
* which adds the points to the cache in the RTM and initializes them.
*/
private void initializePoints() {
ExecutorService executorService = Common.getBean(ExecutorService.class);
// Add the enabled points to the data source.
List<PublishedPointVO> points = publishedPointDao.getEnabledPublishedPoints(getId());
// Startup multi threaded
int pointsPerThread = Common.envProps.getInt("runtime.publishedPoint.startupThreads.pointsPerThread", 1000);
int startupThreads = Common.envProps.getInt("runtime.publishedPoint.startupThreads", Runtime.getRuntime().availableProcessors());
PublishedPointGroupInitializer pointInitializer = new PublishedPointGroupInitializer(executorService, startupThreads);
pointInitializer.initialize(points, pointsPerThread);
}
use of com.serotonin.m2m2.rt.PublishedPointGroupInitializer in project ma-core-public by infiniteautomation.
the class PublisherRT method initializePoints.
/**
* The {@link PublishedPointGroupInitializer} calls
* {@link RuntimeManager#startPublishedPoint(PublishedPointVO) startPublishedPoint()}
* which adds the points to the cache in the RTM and initializes them.
*/
private void initializePoints() {
ExecutorService executorService = Common.getBean(ExecutorService.class);
// Add the enabled points to the data source.
List<PublishedPointVO> points = publishedPointDao.getEnabledPublishedPoints(getId());
// Startup multi threaded
int pointsPerThread = Common.envProps.getInt("runtime.publishedPoint.startupThreads.pointsPerThread", 1000);
int startupThreads = Common.envProps.getInt("runtime.publishedPoint.startupThreads", Runtime.getRuntime().availableProcessors());
PublishedPointGroupInitializer pointInitializer = new PublishedPointGroupInitializer(executorService, startupThreads);
pointInitializer.initialize(points, pointsPerThread);
}
Aggregations