public abstract class AbstractWriter extends Object implements SourceWriter
SourceWriter.
Plugins that extend this class need only to implement
SourceWriter.add(Tree) and SourceWriter.update(Tree), as the
implementation of the stream-based methods can be derived from these methods.
Note that the derived implementations are naive and highly inefficient if the data source supports more direct implementations. In this case, plugins can override derived implementations selectively.
SourceWriter,
Serialized Form| Constructor and Description |
|---|
AbstractWriter() |
| Modifier and Type | Method and Description |
|---|---|
org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> |
add(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> stream)
Default implementation of
SourceWriter.add(Stream) based
on repeated delegation to SourceWriter.add(Tree). |
org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> |
update(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> deltaStream)
Default implementation of
SourceWriter.update(Stream) based
on repeated delegation to SourceWriter.update(Tree). |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, updatepublic org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> add(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> stream)
throws UnsupportedOperationException,
Exception
SourceWriter.add(Stream) based
on repeated delegation to SourceWriter.add(Tree).
It should be inherited only if the source does not support stream-based additions.
add in interface SourceWriterstream - the stream of treesUnsupportedOperationException - if the data source does not support this operationUnsupportedRequestException - if the data source does not support this requestException - if the operation fails as a whole for an unexpected errorSourceWriter.add(Stream)public org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> update(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> deltaStream)
throws UnsupportedOperationException,
Exception
SourceWriter.update(Stream) based
on repeated delegation to SourceWriter.update(Tree).
It should be inherited only if the source does not support stream-based updates.
update in interface SourceWriterdeltaStream - the delta treesUnsupportedOperationException - if the data source does not support this operationUnsupportedRequestException - if the data source does not support this requestException - if the operation fails as a whole for an expected errorSourceWriter.update(Stream)Copyright © 2018. All Rights Reserved.