use of com.palantir.timestamp.TimestampService in project atlasdb by palantir.
the class FastForwardTimestamp method executeTimestampCommand.
@Override
protected int executeTimestampCommand(AtlasDbServices services) {
printer.warn("This CLI has been deprecated. Please use the timestamp-management/fast-forward endpoint instead.");
TimestampService ts = services.getTimestampService();
if (!(ts instanceof TimestampManagementService)) {
printer.error("Timestamp service must be of type {}, but yours is {}. Exiting.", SafeArg.of("expected type", TimestampManagementService.class.toString()), SafeArg.of("found type", ts.getClass().toString()));
return 1;
}
TimestampManagementService tms = (TimestampManagementService) ts;
tms.fastForwardTimestamp(timestamp);
printer.info("Timestamp successfully fast-forwarded to {}", SafeArg.of("timestamp", timestamp));
return 0;
}
Aggregations