public static class MasterSelectionPolicy.Factory extends Object
MasterSelectionPolicy
.Constructor and Description |
---|
Factory() |
Modifier and Type | Method and Description |
---|---|
static MasterSelectionPolicy |
anyMaster()
Creates a MasterSelectionPolicy that selects a random master to connect.
|
static MasterSelectionPolicy |
anyStandbyMaster()
Creates a MasterSelectionPolicy that selects a standby master to connect.
|
static MasterSelectionPolicy |
anyStandbyMaster(long randomSeed)
Creates a MasterSelectionPolicy that selects a standby master to connect.
|
static MasterSelectionPolicy |
primaryMaster()
Creates a MasterSelectionPolicy that selects the primary master to connect.
|
static MasterSelectionPolicy |
specifiedMaster(InetSocketAddress masterAddress)
Creates a MasterSelectionPolicy that selects a specified master to connect.
|
public static MasterSelectionPolicy primaryMaster()
public static MasterSelectionPolicy anyStandbyMaster()
public static MasterSelectionPolicy anyStandbyMaster(long randomSeed)
randomSeed
- a random seed to do the deterministic random selectionpublic static MasterSelectionPolicy anyMaster()
public static MasterSelectionPolicy specifiedMaster(InetSocketAddress masterAddress)
masterAddress
- the master address to connectCopyright © 2023. All Rights Reserved.