ScanQueryContext::setMaxRowsQueuedForOrdering()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Level23\Druid\Context;
5
6
class ScanQueryContext extends QueryContext
7
{
8
    /**
9
     * The maximum number of rows returned when time ordering is used. Overrides the identically named config.
10
     * Default: druid.query.scan.maxRowsQueuedForOrdering
11
     *
12
     * @param int $maxRowsQueuedForOrdering
13
     *
14
     * @return $this
15
     */
16 5
    public function setMaxRowsQueuedForOrdering(int $maxRowsQueuedForOrdering): self
17
    {
18 5
        $this->properties['maxRowsQueuedForOrdering'] = $maxRowsQueuedForOrdering;
19
20 5
        return $this;
21
    }
22
23
    /**
24
     * The maximum number of segments scanned per historical when time ordering is used. Overrides the identically
25
     * named config.
26
     * Default: druid.query.scan.maxSegmentPartitionsOrderedInMemory
27
     *
28
     * @param int $maxSegmentPartitionsOrderedInMemory
29
     *
30
     * @return $this
31
     */
32 1
    public function setMaxSegmentPartitionsOrderedInMemory(int $maxSegmentPartitionsOrderedInMemory): self
33
    {
34 1
        $this->properties['maxSegmentPartitionsOrderedInMemory'] = $maxSegmentPartitionsOrderedInMemory;
35
36 1
        return $this;
37
    }
38
}