class PathsRecords extends DoubleWayMultiPathsRecords {

    public PathsRecords(boolean concurrent, Id sourceV, Id targetV) {
        super(RecordType.ARRAY, concurrent, sourceV, targetV);
    }

    @Watched
    @Override
    public PathSet findPath(Id target, Function<Id, Boolean> filter,
                            boolean all, boolean ring) {<FILL_FUNCTION_BODY>}
}

        assert all;
        int targetCode = this.code(target);
        int parentCode = this.current();
        PathSet paths = PathSet.EMPTY;

        // Traverse backtrace is not allowed, stop now
        if (this.parentsContain(targetCode)) {
            return paths;
        }

        // Add to current layer
        this.addPath(targetCode, parentCode);
        // If cross point exists, path found, concat them
        if (this.movingForward() && this.targetContains(targetCode)) {
            paths = this.linkPath(parentCode, targetCode, ring);
        }
        if (!this.movingForward() && this.sourceContains(targetCode)) {
            paths = this.linkPath(targetCode, parentCode, ring);
        }
        return paths;
    
<methods>public void <init>(org.apache.hugegraph.traversal.algorithm.records.record.RecordType, boolean, org.apache.hugegraph.backend.id.Id, org.apache.hugegraph.backend.id.Id) ,public long accessed() ,public void finishOneLayer() ,public boolean hasNextKey() ,public org.apache.hugegraph.backend.id.Id nextKey() ,public boolean parentsContain(int) ,public boolean sourcesLessThanTargets() ,public void startOneLayer(boolean) <variables>private long accessed,private int currentKey,private boolean movingForward,private org.apache.hugegraph.util.collection.IntIterator parentRecordKeys,private final non-sealed Stack<org.apache.hugegraph.traversal.algorithm.records.record.Record> sourceRecords,private final non-sealed Stack<org.apache.hugegraph.traversal.algorithm.records.record.Record> targetRecords