com.alipay.remoting.util
Class GlobalSwitch
java.lang.Object
com.alipay.remoting.util.GlobalSwitch
- All Implemented Interfaces:
- Switch
public class GlobalSwitch
- extends Object
- implements Switch
Global switches used in client or server
NOTICE:
1. system settings will take effect in all bolt client or server instances in one process
2. user settings will only take effect in the current instance of bolt client or server.
|
Method Summary |
boolean |
isOn(int switchIndex)
check switch whether on |
static void |
reinit()
Reinit system settings. |
void |
turnOn(int switchIndex)
api for user to turn on a feature |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONN_RECONNECT_SWITCH
public static final int CONN_RECONNECT_SWITCH
- See Also:
- Constant Field Values
CONN_MONITOR_SWITCH
public static final int CONN_MONITOR_SWITCH
- See Also:
- Constant Field Values
SERVER_MANAGE_CONNECTION_SWITCH
public static final int SERVER_MANAGE_CONNECTION_SWITCH
- See Also:
- Constant Field Values
SERVER_SYNC_STOP
public static final int SERVER_SYNC_STOP
- See Also:
- Constant Field Values
GlobalSwitch
public GlobalSwitch()
turnOn
public void turnOn(int switchIndex)
- Description copied from interface:
Switch
- api for user to turn on a feature
- Specified by:
turnOn in interface Switch
- Parameters:
switchIndex - the switch index of feature
isOn
public boolean isOn(int switchIndex)
- Description copied from interface:
Switch
- check switch whether on
- Specified by:
isOn in interface Switch
- Returns:
- true if either system setting is on or user setting is on
reinit
public static void reinit()
- Reinit system settings. For test case use only
Copyright © 2018. All rights reserved.