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