/** * Creates a new instance. * * @param workingDirectory * The directory containing configuration and tracking files. * @param humanReadable * Print the replication lag in a Hours, Minutes and Seconds * instead of the raw number of seconds */ public ReplicationLagReader(File workingDirectory, boolean humanReadable) { this.workingDirectory = workingDirectory; this.humanReadable = humanReadable; serverStateReader = new ServerStateReader(); }
/** * Creates a new instance. * * @param workingDirectory * The directory containing configuration and tracking files. * @param humanReadable * Print the replication lag in a Hours, Minutes and Seconds * instead of the raw number of seconds */ public ReplicationLagReader(File workingDirectory, boolean humanReadable) { this.workingDirectory = workingDirectory; this.humanReadable = humanReadable; serverStateReader = new ServerStateReader(); }
/** * Creates a new instance. * * @param workingDirectory * The directory containing configuration and tracking files. */ public BaseReplicationDownloader(File workingDirectory) { this.workingDirectory = workingDirectory; sequenceFormatter = new ReplicationSequenceFormatter(9, 3); serverStateReader = new ServerStateReader(); }
/** * Creates a new instance. * * @param workingDirectory * The directory containing configuration and tracking files. */ public BaseReplicationDownloader(File workingDirectory) { this.workingDirectory = workingDirectory; sequenceFormatter = new ReplicationSequenceFormatter(9, 3); serverStateReader = new ServerStateReader(); }
private long getCurrentSequenceNumber() { try { return new ServerStateReader().getServerState(dataDirectory.toURI().toURL()).getSequenceNumber(); } catch (MalformedURLException e) { throw new OsmosisRuntimeException("Unable to get the current sequence number", e); } }