/** * @return a String representing a particular timestamp (in milliseconds) */ public static String format(long timestamp) { return format(Instant.ofEpochMilli(timestamp)); }
/** * @return a String representing the current datetime */ public static String now() { return format(Instant.now()); }
/** * @return a String representing the current datetime */ public static String now() { return format(Instant.now()); }
/** * @return a String representing a particular timestamp (in milliseconds) */ public static String format(long timestamp) { return format(Instant.ofEpochMilli(timestamp)); }
stats.currentLedgerEntries = ml.getCurrentLedgerEntries(); stats.currentLedgerSize = ml.getCurrentLedgerSize(); stats.lastLedgerCreatedTimestamp = DateFormatter.format(ml.getLastLedgerCreatedTimestamp()); if (ml.getLastLedgerCreationFailureTimestamp() != 0) { stats.lastLedgerCreationFailureTimestamp = DateFormatter.format(ml.getLastLedgerCreationFailureTimestamp()); cs.cursorLedgerLastEntry = cursor.getCursorLedgerLastEntry(); cs.individuallyDeletedMessages = cursor.getIndividuallyDeletedMessages(); cs.lastLedgerSwitchTimestamp = DateFormatter.format(cursor.getLastLedgerSwitchTimestamp()); cs.state = cursor.getState(); cs.numberOfEntriesSinceFirstNotAckedMessage = cursor.getNumberOfEntriesSinceFirstNotAckedMessage();