examples/appnet-api-server/src/main/java/com/hedera/hashgraph/identity/hcs/example/appnet/AppnetStorage.java
/**
   * Persists DiDs from memory into a file.
   *
   * @param consensusTimeStamp The consensusTimeStamp of the last message received from mirror node
   */
Persists DiDs from memory into a file.
@param consensusTimeStamp The consensusTimeStamp of the last message received from mirror node
Persists DiDs from memory into a file . @param consensusTimeStamp The consensusTimeStamp of the last message received from mirror node
private void persistDiDs(final Instant consensusTimeStamp) {
    didCount += 1;
    if (didCount == didStoreInterval) {
      didCount = 0;
      try (OutputStream fos = Files.newOutputStream(Paths.get(DIDSFILEPATH), StandardOpenOption.CREATE)) {
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(didStorage);
        oos.writeObject(consensusTimeStamp);
        oos.close();
        log.info("Serialized DiD HashMap data is saved in persistedDID.ser");
      } catch (IOException ioe) {
        log.error(ioe.getMessage());
      }
    }
  }
private void persistDiDs ( final Instant consensusTimeStamp ) { didCount += 1 ; if ( didCount == didStoreInterval ) { didCount = 0 ; try ( OutputStream fos = Files . newOutputStream ( Paths . get ( DIDSFILEPATH ) , StandardOpenOption . CREATE ) ) { ObjectOutputStream oos = new ObjectOutputStream ( fos ) ; oos . writeObject ( didStorage ) ; oos . writeObject ( consensusTimeStamp ) ; oos . close ( ) ; log . info ( "Serialized DiD HashMap data is saved in persistedDID.ser" ) ; } catch ( IOException ioe ) { log . error ( ioe . getMessage ( ) ) ; } } }
Persists DiDs from memory into a file.
Persists DiDs from memory into a file .