public class DefaultClusterClient extends Object implements ClusterClient
| 构造器和说明 |
|---|
DefaultClusterClient(RegionContext regionContext) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addConcurrentListener(ClusterListener listener)
Add concurrent listener, listener consumes partition one by one
|
void |
addConcurrentListener(String className)
Add concurrent listener using default constructor by class name
|
void |
askFor(String target)
Ask for subscribe target
|
void |
askForGUID(String guid)
Ask for GUID
|
List<ClusterListener> |
getConcurrentListeners()
Get concurrent listener list
|
void |
start()
Start to launch client
|
void |
stop()
Stop to launch client
|
void |
waitForStop(long timeLimitInSec)
Wait for limited time to stop, mainly for testing
|
public DefaultClusterClient(RegionContext regionContext)
public void askFor(String target) throws Exception
ClusterClientaskFor 在接口中 ClusterClienttarget - targetException - Exceptionpublic void askForGUID(String guid) throws Exception
ClusterClientaskForGUID 在接口中 ClusterClientguid - guidException - Exceptionpublic void start()
throws Exception
ClusterClientstart 在接口中 ClusterClientException - Exceptionpublic void waitForStop(long timeLimitInSec)
throws InterruptedException
ClusterClientwaitForStop 在接口中 ClusterClienttimeLimitInSec - limited time to wait for stoppedInterruptedException - InterruptedExceptionpublic void stop()
throws Exception
ClusterClientstop 在接口中 ClusterClientException - Exceptionpublic void addConcurrentListener(ClusterListener listener)
ClusterClientaddConcurrentListener 在接口中 ClusterClientlistener - listenerpublic List<ClusterListener> getConcurrentListeners()
ClusterClientgetConcurrentListeners 在接口中 ClusterClientpublic void addConcurrentListener(String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException
ClusterClientaddConcurrentListener 在接口中 ClusterClientclassName - classNameInstantiationException - InstantiationExceptionIllegalAccessException - IllegalAccessExceptionClassNotFoundException - ClassNotFoundExceptionCopyright © 2017. All Rights Reserved.