Class GetWalksHandler

  • All Implemented Interfaces:
    OperationHandler<GetWalks>, OutputOperationHandler<GetWalks,​Iterable<Walk>>

    public class GetWalksHandler
    extends Object
    implements OutputOperationHandler<GetWalks,​Iterable<Walk>>
    An operation handler for GetWalks operations.

    The handler executes each GetElements operation in the parent GetWalks operation in turn and incrementally creates an in-memory representation of the resulting graph. Once all GetElements operations have been executed, a recursive depth-first search algorithm is used to construct all of the Walks that exist in the temporary graph.

    The default handler has two settings which can be overridden by system administrators:

    • maxHops - prevent users from executing GetWalks operations that contain more than a set number of hops.
    • prune - toggle pruning for the in-memory graph representation. Enabling pruning instructs the in-memory graph representation to discard any edges from the previous GetElements operation which do not join up with any edges in the current GetElements operation (orphaned edges). This reduces the memory footprint of the in-memory graph representation, but requires some additional processing while constructing the in-memory graph.

    The maxHops setting is not set by default (i.e. there is no limit to the number of hops that a user can request). The prune flag is enabled by default (for applications where performance is paramount and any issues arising from excessive memory usage can be mitigated, this flag can be disabled).

    This operation handler can be modified by supplying an operationDeclarations.json file in order to limit the maximum number of hops permitted or to enable/disable the pruning feature.

    Currently the handler only supports creating Walks which contain Edges.