private Snapshot createSnapshot(SnapshotDescriptor descriptor){
  if (storage.level() == StorageLevel.MEMORY) {
    return createMemorySnapshot(descriptor);
  }
 else {
    return createDiskSnapshot(descriptor);
  }
}

private Snapshot createSnapshot ( SnapshotDescriptor descriptor ) { if ( storage . level ( ) == StorageLevel . MEMORY ) { return createMemorySnapshot ( descriptor ) ; } else { return createDiskSnapshot ( descriptor ) ; } }
creates a new snapshot buffer .
