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
3namespace CirrusSearch\Assignment;
4
5interface 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     * @return string[] List of the cluster groups to send writes to
22     */
23    public function getWritableClusters(): array;
24
25    /**
26     * @param string $clusterName
27     * @return bool True when the named cluster is writable
28     */
29    public function canWriteToCluster( $clusterName );
30
31    /**
32     * @param string|null $cluster Name of cluster group to return connection
33     *  configuration for, or null for the default search cluster.
34     * @return string[]|array[] Either a list of hostnames, for default
35     *  connection configuration, or an array of arrays giving full
36     *  connection specifications.
37     */
38    public function getServerList( $cluster = null ): array;
39
40    /**
41     * @return string|null The name to use to refer to this wikis group in cross-cluster-search.
42     */
43    public function getCrossClusterName();
44}