public class BlockSyncMasterGroup extends Object implements Closeable
Modifier and Type | Class and Description |
---|---|
static class |
BlockSyncMasterGroup.Factory
The factory class.
|
Constructor and Description |
---|
BlockSyncMasterGroup(List<InetSocketAddress> masterAddresses,
BlockWorker blockWorker)
Creates a block sync master group.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
Map<InetSocketAddress,SpecificMasterBlockSync> |
getMasterSyncOperators() |
boolean |
isRegisteredToAllMasters() |
void |
start(ExecutorService executorService)
Starts the heartbeats.
|
void |
waitForPrimaryMasterRegistrationComplete(InetSocketAddress primaryMasterAddress)
Waits until the primary master registration completes.
|
public BlockSyncMasterGroup(List<InetSocketAddress> masterAddresses, BlockWorker blockWorker) throws IOException
masterAddresses
- the master addresses to syncblockWorker
- the block worker instanceIOException
public void start(ExecutorService executorService)
executorService
- the executor service to run the heartbeatspublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void waitForPrimaryMasterRegistrationComplete(InetSocketAddress primaryMasterAddress)
primaryMasterAddress
- the primary master addresspublic boolean isRegisteredToAllMasters()
public Map<InetSocketAddress,SpecificMasterBlockSync> getMasterSyncOperators()
Copyright © 2023. All Rights Reserved.