/** * Creates the pv such that writes are synchronous and read notifications * comes at most at the rate specified. * * @param period minimum time between read notifications * @return a new PV */ public PV<R, W> synchWriteAndMaxReadRate(Duration period) { PVReader<R> pvReader = pvReaderConfiguration.maxRate(period); PVWriter<W> pvWriter = pvWriterConfiguration.sync(); return new PV<R, W>(pvReader, pvWriter); }
public void b4_synchronousWrite() { PVWriter<Object> pvWriter = PVManager.write(channel("channelName")).sync(); // This will block until the write is done pvWriter.write("New value"); System.out.println("Write finished"); // Remember to close pvWriter.close(); }