public class ImageNameAssigner extends Object implements AutoCloseable
| Constructor and Description |
|---|
ImageNameAssigner(String dbURL)
Create an instant of the image name assignment class.
|
| Modifier and Type | Method and Description |
|---|---|
ImageName |
assignImageName(Source source,
Controller controller,
TimeZone zone,
Duration offset)
Assign an image name for the given source, controller, time zone and
offset and using the current timestamp.
|
ImageName |
assignImageName(Source source,
Controller controller,
TimeZone zone,
Duration offset,
Instant time)
Assign an image name for the given source, controller, time zone and
offset and using the given timestamp.
|
List<ImageName> |
assignImageNames(Source source,
Controller controller,
TimeZone zone,
Duration offset,
int n)
Assign a set of sequential image names for the given source, controller,
time zone and offset and using the current timestamp.
|
List<ImageName> |
assignImageNames(Source source,
Controller controller,
TimeZone zone,
Duration offset,
int n,
Instant time)
Assign a set of sequential image names for the given source, controller,
time zone and offset and using the given timestamp.
|
void |
close() |
public ImageNameAssigner(String dbURL)
dbURL - The database connection URL to be used.public ImageName assignImageName(Source source, Controller controller, TimeZone zone, Duration offset) throws SQLException
source - The source to be used for the image namecontroller - The controller to be used for the image namezone - The time-zone to be used for assigning datesoffset - The offset from midnight in the specified time zone when
the date assigned to the image will rollover.SQLException - If there is an error communicating with the
database.public ImageName assignImageName(Source source, Controller controller, TimeZone zone, Duration offset, Instant time) throws SQLException
source - The source to be used for the image namecontroller - The controller to be used for the image namezone - The time-zone to be used for assigning datesoffset - The offset from midnight in the specified time zone when
the date assigned to the image will rollover.time - The instant to be used for generating the image date, or
null to use the current time.SQLException - If there is an error communicating with the
database.public List<ImageName> assignImageNames(Source source, Controller controller, TimeZone zone, Duration offset, int n) throws SQLException
source - The source to be used for the image namecontroller - The controller to be used for the image namezone - The time-zone to be used for assigning datesoffset - The offset from midnight in the specified time zone when
the date assigned to the image will rollover.n - The number of consecutive names to assignSQLException - If there is an error communicating with the
database.public List<ImageName> assignImageNames(Source source, Controller controller, TimeZone zone, Duration offset, int n, Instant time) throws SQLException
source - The source to be used for the image namecontroller - The controller to be used for the image namezone - The time-zone to be used for assigning datesoffset - The offset from midnight in the specified time zone when
the date assigned to the image will rollover.n - The number of consecutive names to assigntime - The instant to be used for generating the image date, or
null to use the current time.SQLException - If there is an error communicating with the
database.public void close()
throws SQLException
close in interface AutoCloseableSQLExceptionCopyright © 2018 LSST. All rights reserved.