T
- public final class SerializerFileSpool<T> extends Object implements Spool<T>
Constructor and Description |
---|
SerializerFileSpool(LocalStorageService service,
Serializer<T,OutputStream> out,
Deserializer<T,InputStream> in) |
Modifier and Type | Method and Description |
---|---|
Accumulator<T> |
accumulator()
Returns an Accumulator for the spool file.
|
Iterator<T> |
iterator()
Returns an Iterable over the spool file.
|
public SerializerFileSpool(LocalStorageService service, Serializer<T,OutputStream> out, Deserializer<T,InputStream> in) throws ServiceException
ServiceException
public Iterator<T> iterator()
Spool
Depending on the implementation, this method may be called only once per Spool instance, or it may be called repeatedly. Similarly, with some Spool implementations, attempts to append to the SpoolFile after calling iterator() may fail fast with a ConcurrentModificationException.
public Accumulator<T> accumulator()
Spool
Depending on the implementation, this method may be called only once per Spool instance, or it may be called repeatedly. Similarly, with some Spool implementations, attempts to append to the SpoolFile after calling iterator() may fail fast with a ConcurrentModificationException.
accumulator
in interface Accumulable<T>
accumulator
in interface Spool<T>
Accumulator
Copyright © 2017 The Apache Software Foundation. All rights reserved.