@Override public Void call() throws Exception { // Runs in an auto save thread. if (!savePending.getAndSet(false)) { // Some other scheduled request already beat us to it. return null; } Date lastBlockSeenTime = wallet.getLastBlockSeenTime(); log.info("Background saving wallet; last seen block is height {}, date {}, hash {}", wallet.getLastBlockSeenHeight(), lastBlockSeenTime != null ? Utils.dateTimeFormat(lastBlockSeenTime) : "unknown", wallet.getLastBlockSeenHash()); saveNowInternal(); return null; } };
@Override public Void call() throws Exception { // Runs in an auto save thread. if (!savePending.getAndSet(false)) { // Some other scheduled request already beat us to it. return null; } Date lastBlockSeenTime = wallet.getLastBlockSeenTime(); log.info("Background saving wallet; last seen block is height {}, date {}, hash {}", wallet.getLastBlockSeenHeight(), lastBlockSeenTime != null ? Utils.dateTimeFormat(lastBlockSeenTime) : "unknown", wallet.getLastBlockSeenHash()); saveNowInternal(); return null; } };
@Override public Void call() throws Exception { // Runs in an auto save thread. if (!savePending.getAndSet(false)) { // Some other scheduled request already beat us to it. return null; } Date lastBlockSeenTime = wallet.getLastBlockSeenTime(); log.info("Background saving wallet; last seen block is height {}, date {}, hash {}", wallet.getLastBlockSeenHeight(), lastBlockSeenTime != null ? Utils.dateTimeFormat(lastBlockSeenTime) : "unknown", wallet.getLastBlockSeenHash()); saveNowInternal(); return null; } };
@Override public Void call() throws Exception { // Runs in an auto save thread. if (!savePending.getAndSet(false)) { // Some other scheduled request already beat us to it. return null; } Date lastBlockSeenTime = wallet.getLastBlockSeenTime(); log.info("Background saving wallet; last seen block is height {}, date {}, hash {}", wallet.getLastBlockSeenHeight(), lastBlockSeenTime != null ? Utils.dateTimeFormat(lastBlockSeenTime) : "unknown", wallet.getLastBlockSeenHash()); saveNowInternal(); return null; } };
/** Actually write the wallet file to disk, using an atomic rename when possible. Runs on the current thread. */ public void saveNow() throws IOException { // Can be called by any thread. However the wallet is locked whilst saving, so we can have two saves in flight // but they will serialize (using different temp files). Date lastBlockSeenTime = wallet.getLastBlockSeenTime(); log.info("Saving wallet; last seen block is height {}, date {}, hash {}", wallet.getLastBlockSeenHeight(), lastBlockSeenTime != null ? Utils.dateTimeFormat(lastBlockSeenTime) : "unknown", wallet.getLastBlockSeenHash()); saveNowInternal(); }
/** Actually write the wallet file to disk, using an atomic rename when possible. Runs on the current thread. */ public void saveNow() throws IOException { // Can be called by any thread. However the wallet is locked whilst saving, so we can have two saves in flight // but they will serialize (using different temp files). Date lastBlockSeenTime = wallet.getLastBlockSeenTime(); log.info("Saving wallet; last seen block is height {}, date {}, hash {}", wallet.getLastBlockSeenHeight(), lastBlockSeenTime != null ? Utils.dateTimeFormat(lastBlockSeenTime) : "unknown", wallet.getLastBlockSeenHash()); saveNowInternal(); }
/** Actually write the wallet file to disk, using an atomic rename when possible. Runs on the current thread. */ public void saveNow() throws IOException { // Can be called by any thread. However the wallet is locked whilst saving, so we can have two saves in flight // but they will serialize (using different temp files). Date lastBlockSeenTime = wallet.getLastBlockSeenTime(); log.info("Saving wallet; last seen block is height {}, date {}, hash {}", wallet.getLastBlockSeenHeight(), lastBlockSeenTime != null ? Utils.dateTimeFormat(lastBlockSeenTime) : "unknown", wallet.getLastBlockSeenHash()); saveNowInternal(); }
builder.append(" ").append(spent.size()).append(" spent transactions\n"); builder.append(" ").append(dead.size()).append(" dead transactions\n"); final Date lastBlockSeenTime = getLastBlockSeenTime(); builder.append("Last seen best block: ").append(getLastBlockSeenHeight()).append(" (") .append(lastBlockSeenTime == null ? "time unknown" : Utils.dateTimeFormat(lastBlockSeenTime))
/** Actually write the wallet file to disk, using an atomic rename when possible. Runs on the current thread. */ public void saveNow() throws IOException { // Can be called by any thread. However the wallet is locked whilst saving, so we can have two saves in flight // but they will serialize (using different temp files). if (executor.isShutdown()) return; Date lastBlockSeenTime = wallet.getLastBlockSeenTime(); log.info("Saving wallet; last seen block is height {}, date {}, hash {}", wallet.getLastBlockSeenHeight(), lastBlockSeenTime != null ? Utils.dateTimeFormat(lastBlockSeenTime) : "unknown", wallet.getLastBlockSeenHash()); saveNowInternal(); }
builder.append(" ").append(spent.size()).append(" spent transactions\n"); builder.append(" ").append(dead.size()).append(" dead transactions\n"); final Date lastBlockSeenTime = getLastBlockSeenTime(); builder.append("Last seen best block: ").append(getLastBlockSeenHeight()).append(" (") .append(lastBlockSeenTime == null ? "time unknown" : Utils.dateTimeFormat(lastBlockSeenTime))
builder.append(" ").append(spent.size()).append(" spent transactions\n"); builder.append(" ").append(dead.size()).append(" dead transactions\n"); final Date lastBlockSeenTime = getLastBlockSeenTime(); builder.append("Last seen best block: ").append(getLastBlockSeenHeight()).append(" (") .append(lastBlockSeenTime == null ? "time unknown" : Utils.dateTimeFormat(lastBlockSeenTime))
builder.append(" ").append(spent.size()).append(" spent transactions\n"); builder.append(" ").append(dead.size()).append(" dead transactions\n"); final Date lastBlockSeenTime = getLastBlockSeenTime(); builder.append("Last seen best block: ").append(getLastBlockSeenHeight()).append(" (") .append(lastBlockSeenTime == null ? "time unknown" : Utils.dateTimeFormat(lastBlockSeenTime))