Interface ArchiveWriter
public interface ArchiveWriter
Interface for writing samples to an archive
- Author:
- Kay Kasemir
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Should be called to release resources, for example disconnect from a relational database.voidflush()Write all recently added samples to the archive.getChannel(String name) Obtain a channel to which samples can be written
-
Method Details
-
getChannel
Obtain a channel to which samples can be written- Parameters:
name- Channel name (typically a PV name)- Returns:
WriteChannel, notnull- Throws:
Exception- on error, for example failure to access the data store, or a new, previously unknown channel name could not be added to the archive
-
flush
Write all recently added samples to the archive.Since the underlying implementation is allowed to optimize, it might buffer the added samples, or queue them by data type, and an explicit call to this method is required to flush them out to the archive storage.
- Throws:
Exception- on error, for example failure to access the data store. Samples added since the lastflush()are likely lost
-
close
void close()Should be called to release resources, for example disconnect from a relational database.
-