public class DLedgerServer extends java.lang.Object implements DLedgerProtocolHander
| 构造器和说明 |
|---|
DLedgerServer(DLedgerConfig dLedgerConfig) |
| 限定符和类型 | 方法和说明 |
|---|---|
DLedgerConfig |
getdLedgerConfig() |
DLedgerLeaderElector |
getdLedgerLeaderElector() |
DLedgerRpcService |
getdLedgerRpcService() |
DLedgerStore |
getdLedgerStore() |
MemberState |
getMemberState() |
java.util.concurrent.CompletableFuture<AppendEntryResponse> |
handleAppend(AppendEntryRequest request)
Handle the append requests:
1.append the entry to local store
2.submit the future to entry pusher and wait the quorum ack
3.if the pending requests are full, then reject it immediately
|
java.util.concurrent.CompletableFuture<GetEntriesResponse> |
handleGet(GetEntriesRequest request) |
java.util.concurrent.CompletableFuture<HeartBeatResponse> |
handleHeartBeat(HeartBeatRequest request) |
java.util.concurrent.CompletableFuture<MetadataResponse> |
handleMetadata(MetadataRequest request) |
java.util.concurrent.CompletableFuture<PullEntriesResponse> |
handlePull(PullEntriesRequest request) |
java.util.concurrent.CompletableFuture<PushEntryResponse> |
handlePush(PushEntryRequest request) |
java.util.concurrent.CompletableFuture<VoteResponse> |
handleVote(VoteRequest request) |
void |
shutdown() |
void |
startup() |
public DLedgerServer(DLedgerConfig dLedgerConfig)
public void startup()
public void shutdown()
public MemberState getMemberState()
public java.util.concurrent.CompletableFuture<HeartBeatResponse> handleHeartBeat(HeartBeatRequest request) throws java.lang.Exception
handleHeartBeat 在接口中 DLedgerProtocolHanderjava.lang.Exceptionpublic java.util.concurrent.CompletableFuture<VoteResponse> handleVote(VoteRequest request) throws java.lang.Exception
handleVote 在接口中 DLedgerProtocolHanderjava.lang.Exceptionpublic java.util.concurrent.CompletableFuture<AppendEntryResponse> handleAppend(AppendEntryRequest request) throws java.io.IOException
handleAppend 在接口中 DLedgerClientProtocolHandlerrequest - java.io.IOExceptionpublic java.util.concurrent.CompletableFuture<GetEntriesResponse> handleGet(GetEntriesRequest request) throws java.io.IOException
handleGet 在接口中 DLedgerClientProtocolHandlerjava.io.IOExceptionpublic java.util.concurrent.CompletableFuture<MetadataResponse> handleMetadata(MetadataRequest request) throws java.lang.Exception
handleMetadata 在接口中 DLedgerClientProtocolHandlerjava.lang.Exceptionpublic java.util.concurrent.CompletableFuture<PullEntriesResponse> handlePull(PullEntriesRequest request)
handlePull 在接口中 DLedgerProtocolHanderpublic java.util.concurrent.CompletableFuture<PushEntryResponse> handlePush(PushEntryRequest request) throws java.lang.Exception
handlePush 在接口中 DLedgerProtocolHanderjava.lang.Exceptionpublic DLedgerStore getdLedgerStore()
public DLedgerRpcService getdLedgerRpcService()
public DLedgerLeaderElector getdLedgerLeaderElector()
public DLedgerConfig getdLedgerConfig()
Copyright © 2019. All Rights Reserved.