Skip to content

Commit

Permalink
[ISSUE #310] Fix to successfully generate java doc (#311)
Browse files Browse the repository at this point in the history
* fix(core): remove unused param

1. remove unused param

* fix(core): fix comments to pass generating java doc

1. fix comments to pass generating java doc
  • Loading branch information
TheR1sing3un authored Aug 28, 2023
1 parent 0156c72 commit b2146a5
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ public void wakeUpDispatchers() {
* Complete the TimeoutFuture in pendingAppendResponsesByTerm (CurrentTerm, index).
* Called by statemachineCaller when a committed entry (CurrentTerm, index) was applying to statemachine done.
*
* @param task committed entry
* @return true if complete success
*/
public boolean completeResponseFuture(final ApplyEntry task) {
Expand All @@ -215,6 +216,8 @@ public boolean completeResponseFuture(final ApplyEntry task) {

/**
* Check responseFutures timeout from {beginIndex} in currentTerm
*
* @param beginIndex the beginning index to check
*/
public void checkResponseFuturesTimeout(final long beginIndex) {
final long term = this.memberState.currTerm();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,6 @@ private void writeResponse(RequestOrResponse storeResp, Throwable t, RemotingCom
* CompletableFuture is an excellent choice, whenCompleteAsync will handle the response asynchronously. With an
* independent thread-pool, it will improve performance and reduce blocking points.
*
* @param ctx
* @param request
* @return
* @throws Exception
*/
public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws Exception {
DLedgerRequestCode requestCode = DLedgerRequestCode.valueOf(request.getCode());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,6 @@ public CompletableFuture<VoteResponse> handleVote(VoteRequest request) throws Ex
/**
* 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
*
* @param request
* @return
* @throws IOException
*/
@Override
public CompletableFuture<AppendEntryResponse> handleAppend(AppendEntryRequest request) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,11 @@ public long getCommittedIndex() {

/**
* update committedIndex
*
* @param term term of the entry which is committed. Very importantly, we can only commit the entry with current term, which also means that
* we can't commit the entry with old term.
* @param committedIndex the index of the entry which is committed.
* @return true if the committedIndex is updated, otherwise false.
*/
public boolean leaderUpdateCommittedIndex(long term, long committedIndex) {
if (!this.isLeader()) return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
public abstract class WriteClosure<T> extends Closure {
public abstract void setResp(T t);

public abstract T getResp(T t);
public abstract T getResp();
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import java.util.concurrent.CompletableFuture;

/**
* <h>snapshot dir tree (here is an example)</h>
* snapshot dir tree (here is an example)
* <pre>
* snapshot
* - tmp (saving snapshot now, but has not been renamed to a snapshot dir)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public interface StateMachine {
* User defined snapshot generate function.
*
* @param writer snapshot writer
* @return true on success
*/
boolean onSnapshotSave(final SnapshotWriter writer);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ public interface MmapFile {
/**
* get the data from file channel
*
* @param pos
* @param size
* @param byteBuffer
* @return
* @param pos the start position of the data
* @param size the size of the data
* @param byteBuffer the buffer to store the data
* @return true if success; false otherwise.
*/
boolean getData(int pos, int size, ByteBuffer byteBuffer);
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void setResp(Long aLong) {
}

@Override
public Long getResp(Long aLong) {
public Long getResp() {
return totalEntries;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public void setResp(Object o) {
}

@Override
public Object getResp(Object o) {
public Object getResp() {
return totalEntries;
}

Expand Down

0 comments on commit b2146a5

Please sign in to comment.