|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.data.tmf.impl.AbstractWriter
public abstract class AbstractWriter
Partial implementation of 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 Summary | |
|---|---|
AbstractWriter()
|
|
| Method Summary | |
|---|---|
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). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.gcube.data.tmf.api.SourceWriter |
|---|
add, update |
| Constructor Detail |
|---|
public AbstractWriter()
| Method Detail |
|---|
public 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 trees
UnsupportedOperationException - if the data source does not support this operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the data source does not support this request
Exception - 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 trees
UnsupportedOperationException - if the data source does not support this operation
org.gcube.common.clients.exceptions.UnsupportedRequestException - if the data source does not support this request
Exception - if the operation fails as a whole for an expected errorSourceWriter.update(Stream)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||