Skip to content

Commit

Permalink
[ISSUE #6960] Added Slot formatting sketch comments (#6961)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsm committed Jul 5, 2023
1 parent 00fc42b commit 4f840af
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 4f840af

Please sign in to comment.