public interface Service<I,R> extends AutoCloseable
Traverser
s or raw values (which will be
converted into Traversers by CallStep
.Modifier and Type | Interface and Description |
---|---|
static interface |
Service.DirectoryService<I>
Meta-service to list and describe registered callable services.
|
static interface |
Service.Exceptions |
static class |
Service.ServiceCallContext
Context information for service call invocation.
|
static interface |
Service.ServiceFactory<I,R>
The service factory creates instances of callable services based on the desired execution type.
|
static class |
Service.Type
Service calls can appear at the start of a traversal or mid-traversal.
|
Modifier and Type | Method and Description |
---|---|
default void |
close()
Services can implement cleanup/shutdown procedures here.
|
default CloseableIterator<R> |
execute(Service.ServiceCallContext ctx,
Map params)
Execute a Start service call.
|
default CloseableIterator<R> |
execute(Service.ServiceCallContext ctx,
Traverser.Admin<I> in,
Map params)
Execute a Streaming service call with one upstream input.
|
default CloseableIterator<R> |
execute(Service.ServiceCallContext ctx,
TraverserSet<I> in,
Map params)
Execute a Barrier service call with all upstream input.
|
default int |
getMaxBarrierSize()
Return the max barrier size.
|
default Set<TraverserRequirement> |
getRequirements()
Return any
TraverserRequirement s necessary for this service call. |
Service.Type |
getType()
Return the
Service.Type of service call. |
default boolean |
isBarrier()
True if Barrier type.
|
default boolean |
isStart()
True if Start type.
|
default boolean |
isStreaming()
True if Streaming type.
|
Service.Type getType()
Service.Type
of service call.default Set<TraverserRequirement> getRequirements()
TraverserRequirement
s necessary for this service call.default boolean isStart()
default boolean isStreaming()
default boolean isBarrier()
default int getMaxBarrierSize()
default CloseableIterator<R> execute(Service.ServiceCallContext ctx, Map params)
default CloseableIterator<R> execute(Service.ServiceCallContext ctx, Traverser.Admin<I> in, Map params)
default CloseableIterator<R> execute(Service.ServiceCallContext ctx, TraverserSet<I> in, Map params)
default void close()
close
in interface AutoCloseable
Copyright © 2013–2022 Apache Software Foundation. All rights reserved.