Interface Service<I,R>
- 
- All Superinterfaces:
 AutoCloseable
- All Known Subinterfaces:
 Service.DirectoryService<I>
- All Known Implementing Classes:
 ServiceRegistry,TinkerDegreeCentralityFactory,TinkerServiceRegistry,TinkerServiceRegistry.LambdaBarrierService,TinkerServiceRegistry.LambdaStartService,TinkerServiceRegistry.LambdaStreamingService,TinkerServiceRegistry.TinkerService,TinkerTextSearchFactory
public interface Service<I,R> extends AutoCloseable
Service call with I input type and R return type. Services can returnTraversers or raw values (which will be converted into Traversers byCallStep.- Author:
 - Mike Personick (http://github.com/mikepersonick)
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceService.DirectoryService<I>Meta-service to list and describe registered callable services.static interfaceService.Exceptionsstatic classService.ServiceCallContextContext information for service call invocation.static interfaceService.ServiceFactory<I,R>The service factory creates instances of callable services based on the desired execution type.static classService.TypeService calls can appear at the start of a traversal or mid-traversal. 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()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 intgetMaxBarrierSize()Return the max barrier size.default Set<TraverserRequirement>getRequirements()Return anyTraverserRequirements necessary for this service call.Service.TypegetType()Return theService.Typeof service call.default booleanisBarrier()True if Barrier type.default booleanisStart()True if Start type.default booleanisStreaming()True if Streaming type. 
 - 
 
- 
- 
Method Detail
- 
getType
Service.Type getType()
Return theService.Typeof service call. 
- 
getRequirements
default Set<TraverserRequirement> getRequirements()
Return anyTraverserRequirements necessary for this service call. 
- 
isStart
default boolean isStart()
True if Start type. 
- 
isStreaming
default boolean isStreaming()
True if Streaming type. 
- 
isBarrier
default boolean isBarrier()
True if Barrier type. 
- 
getMaxBarrierSize
default int getMaxBarrierSize()
Return the max barrier size. Default is all upstream solutions. 
- 
execute
default CloseableIterator<R> execute(Service.ServiceCallContext ctx, Map params)
Execute a Start service call. 
- 
execute
default CloseableIterator<R> execute(Service.ServiceCallContext ctx, Traverser.Admin<I> in, Map params)
Execute a Streaming service call with one upstream input. 
- 
execute
default CloseableIterator<R> execute(Service.ServiceCallContext ctx, TraverserSet<I> in, Map params)
Execute a Barrier service call with all upstream input. 
- 
close
default void close()
Services can implement cleanup/shutdown procedures here.- Specified by:
 closein interfaceAutoCloseable
 
 - 
 
 -