Yuta HIGUCHI | 8f18219 | 2014-08-02 18:47:42 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.util.distributed.sharedlog; |
| 2 | |
| 3 | import javax.annotation.concurrent.ThreadSafe; |
| 4 | |
| 5 | import com.google.common.annotations.Beta; |
| 6 | |
| 7 | /** |
| 8 | * Sequencer for LogBasedRuntime. |
| 9 | */ |
| 10 | @Beta |
| 11 | @ThreadSafe |
| 12 | public interface Sequencer { |
| 13 | |
| 14 | /** |
| 15 | * Gets the current sequence number. |
| 16 | * |
| 17 | * @return current sequence number |
| 18 | */ |
| 19 | public SeqNum get(); |
| 20 | |
| 21 | /** |
| 22 | * Gets the next sequence number. |
| 23 | * |
| 24 | * @return next sequence number |
| 25 | */ |
| 26 | public SeqNum next(); |
| 27 | } |