Skip to content

Commit

Permalink
[ISSUE apache#6960] Added Slot formatting sketch comments (apache#6961)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsm authored and lizhimins committed Jul 11, 2023
1 parent 7dcb6cf commit 5474532
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion store/src/main/java/org/apache/rocketmq/store/timer/Slot.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@
*/
package org.apache.rocketmq.store.timer;

/**
* Represents a slot of timing wheel. Format:
* ┌────────────┬───────────┬───────────┬───────────┬───────────┐
* │delayed time│ first pos │ last pos │ num │ magic │
* ├────────────┼───────────┼───────────┼───────────┼───────────┤
* │ 8bytes │ 8bytes │ 8bytes │ 4bytes │ 4bytes │
* └────────────┴───────────┴───────────┴───────────┴───────────┘
*/
public class Slot {
public static final short SIZE = 32;
public final long timeMs;
public final long timeMs; //delayed time
public final long firstPos;
public final long lastPos;
public final int num;
Expand Down

0 comments on commit 5474532

Please sign in to comment.