@Test public void testCloseOutput() { List<String> input = Arrays.asList( "one", "two", "three", "four", "five", "six", "seven", "eight"); FsSpillingListStorage<String> storage = new FsSpillingListStorage<>(new JavaSerializationFactory(), spillFiles, 5); storage.addAll(input); storage.closeOutput(); assertEquals(input, StreamSupport .stream(storage.get().spliterator(), false) .collect(Collectors.toList())); }
void closeOutput() { flush(); if (serializerStream != null) { serializerStream.close(); serializerStream = null; } }
FsSpillingListStorage implements ListStorage<T>, ExternalIterable<T> { void closeOutput() { flush(); if (serializerStream != null) { serializerStream.close(); serializerStream = null; } } }
FsSpillingListStorage implements ListStorage<T>, ExternalIterable<T> { void closeOutput() { flush(); if (serializerStream != null) { serializerStream.close(); serializerStream = null; } } FsSpillingListStorage(
      SerializerFactory serializerFactory,
      SpillFileFactory spillFileFactory,
      int maxElemsInMemory); }
FsSpillingListStorage implements ListStorage<T>, ExternalIterable<T> { void closeOutput() { flush(); if (serializerStream != null) { serializerStream.close(); serializerStream = null; } } FsSpillingListStorage(
      SerializerFactory serializerFactory,
      SpillFileFactory spillFileFactory,
      int maxElemsInMemory); @Override void add(T element); @Override Iterable<T> get(); @Override void clear(); @Override Iterator<T> iterator(); @Override void close(); }
FsSpillingListStorage implements ListStorage<T>, ExternalIterable<T> { void closeOutput() { flush(); if (serializerStream != null) { serializerStream.close(); serializerStream = null; } } FsSpillingListStorage(
      SerializerFactory serializerFactory,
      SpillFileFactory spillFileFactory,
      int maxElemsInMemory); @Override void add(T element); @Override Iterable<T> get(); @Override void clear(); @Override Iterator<T> iterator(); @Override void close();  }