Interface Service.ServiceFactory<I,R>
- 
- All Superinterfaces:
- AutoCloseable
 - All Known Subinterfaces:
- Service.DirectoryService<I>
 - All Known Implementing Classes:
- ServiceRegistry,- TinkerDegreeCentralityFactory,- TinkerServiceRegistry,- TinkerServiceRegistry.LambdaServiceFactory,- TinkerServiceRegistry.TinkerServiceFactory,- TinkerTextSearchFactory
 
 public static interface Service.ServiceFactory<I,R> extends AutoCloseable The service factory creates instances of callable services based on the desired execution type. Some services (e.g. full text search) might be run at the start of a traversal or mid-traversal. The service factory will create an instance based on how the service will be executed. This leaves open the possibility for a single named service to support multiple execution modes (streaming vs. chunked vs. all-at-once) and dynamically choose one based on the location in the traversal of the service call and the static parameters supplied (this allow for dynamic chunk size).
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()Service factories can implement cleanup/shutdown procedures here.Service<I,R>createService(boolean isStart, Map params)Create a Service call instance.default MapdescribeParams()Return a description of any service call parameters.StringgetName()Get the name of this service.default Set<TraverserRequirement>getRequirements(Service.Type type)Return anyTraverserRequirements necessary for this service call for the supplied executionService.Type.default Map<Service.Type,Set<TraverserRequirement>>getRequirementsByType()Return anyTraverserRequirements necessary for this service call for each executionService.Typeit supports.Set<Service.Type>getSupportedTypes()Get the execution modes that it supports.
 
- 
- 
- 
Method Detail- 
getNameString getName() Get the name of this service.
 - 
getSupportedTypesSet<Service.Type> getSupportedTypes() Get the execution modes that it supports.
 - 
describeParamsdefault Map describeParams() Return a description of any service call parameters.
 - 
getRequirementsByTypedefault Map<Service.Type,Set<TraverserRequirement>> getRequirementsByType() Return anyTraverserRequirements necessary for this service call for each executionService.Typeit supports.
 - 
getRequirementsdefault Set<TraverserRequirement> getRequirements(Service.Type type) Return anyTraverserRequirements necessary for this service call for the supplied executionService.Type.
 - 
createServiceService<I,R> createService(boolean isStart, Map params) Create a Service call instance.- Parameters:
- isStart- true if the call is being used to start a traversal
- params- the static params provided to service call (if any)
- Returns:
- the service call instance
 
 - 
closedefault void close() Service factories can implement cleanup/shutdown procedures here.- Specified by:
- closein interface- AutoCloseable
 
 
- 
 
-