Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | namespace CirrusSearch\Assignment; |
4 | |
5 | interface ClusterAssignment { |
6 | |
7 | /** |
8 | * @param string $cluster The cluster to id. |
9 | * @return string An identifier that unique describes the |
10 | * connection properties. Instances of the same implementation |
11 | * will return same value for same configuration. |
12 | */ |
13 | public function uniqueId( $cluster ); |
14 | |
15 | /** |
16 | * @return string Name of the cluster group to search against |
17 | */ |
18 | public function getSearchCluster(); |
19 | |
20 | /** |
21 | * @param string $updateGroup UpdateGroup::* constant |
22 | * @return string[] List of the cluster groups to send writes to |
23 | */ |
24 | public function getWritableClusters( string $updateGroup ): array; |
25 | |
26 | /** |
27 | * @return string[] List all known cluster groups |
28 | */ |
29 | public function getAllKnownClusters(): array; |
30 | |
31 | /** |
32 | * @param string $clusterName |
33 | * @return bool True if the cluster is defined |
34 | */ |
35 | public function hasCluster( string $clusterName ): bool; |
36 | |
37 | /** |
38 | * @param string $clusterName |
39 | * @param string $updateGroup UpdateGroup::* constant |
40 | * @return bool True when the named cluster is writable for this kind of update |
41 | */ |
42 | public function canWriteToCluster( $clusterName, $updateGroup ); |
43 | |
44 | /** |
45 | * @param string|null $cluster Name of cluster group to return connection |
46 | * configuration for, or null for the default search cluster. |
47 | * @return string[]|array[] Either a list of hostnames, for default |
48 | * connection configuration, or an array of arrays giving full |
49 | * connection specifications. |
50 | */ |
51 | public function getServerList( $cluster = null ): array; |
52 | |
53 | /** |
54 | * @return string|null The name to use to refer to this wikis group in cross-cluster-search. |
55 | */ |
56 | public function getCrossClusterName(); |
57 | } |