Package io.deephaven.dhservice.client
Interface ConfigurationService
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
ConfigurationServiceEtcdImpl,ConfigurationServiceGrpcImpl
-
Method Summary
Modifier and TypeMethodDescriptionabout()voidclose()voiddeleteFiles(@NotNull Collection<String> filenames) Atomically remove all properties files in the collection of names.Load all known configuration files.Optional<byte[]>Load the named configuration and return the contents as aByteString.voidupdateFile(@NotNull String filename, @org.jetbrains.annotations.NotNull byte[] contents, boolean updateOnSameContents) Update the stored properties file with the given name with the new supplied contents.
-
Method Details
-
about
String about() -
getFile
Load the named configuration and return the contents as aByteString.- Parameters:
filename- the "filename" to load- Returns:
- the file contents as a byte array
- Throws:
ConfigurationAccessException
-
getAllFiles
Load all known configuration files.- Returns:
- a map of names to file contents. Caller must remember the starting filename.
- Throws:
ConfigurationAccessException- if the complete result cannot be loaded
-
updateFile
void updateFile(@NotNull @NotNull String filename, @NotNull @org.jetbrains.annotations.NotNull byte[] contents, boolean updateOnSameContents) throws ConfigurationAccessException Update the stored properties file with the given name with the new supplied contents.- Parameters:
filename- the filenamecontents- the file contentsupdateOnSameContents- whether the file should be updated even if the contents are the same- Throws:
ConfigurationAccessException
-
deleteFiles
void deleteFiles(@NotNull @NotNull Collection<String> filenames) throws ConfigurationAccessException Atomically remove all properties files in the collection of names. Removing a file that does not exist is not considered an error.- Parameters:
filenames- the file names to remove- Throws:
ConfigurationAccessException- for any errors removing the files.
-
close
void close()- Specified by:
closein interfaceAutoCloseable
-