Ray Milkey | 9ed4b96 | 2014-08-20 15:43:40 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.matchaction; |
| 2 | |
Sho SHIMIZU | 7cd8a42 | 2014-08-27 16:05:21 -0700 | [diff] [blame] | 3 | import net.onrc.onos.core.util.AbstractBlockAllocatorBasedIdGenerator; |
Ray Milkey | 9ed4b96 | 2014-08-20 15:43:40 -0700 | [diff] [blame] | 4 | import net.onrc.onos.core.util.IdBlockAllocator; |
Ray Milkey | 9ed4b96 | 2014-08-20 15:43:40 -0700 | [diff] [blame] | 5 | |
| 6 | /** |
Sho SHIMIZU | afc793e | 2014-08-27 15:22:09 -0700 | [diff] [blame] | 7 | * Generates a global unique MatchActionId. |
Ray Milkey | 9ed4b96 | 2014-08-20 15:43:40 -0700 | [diff] [blame] | 8 | */ |
| 9 | public class MatchActionIdGeneratorWithIdBlockAllocator |
Sho SHIMIZU | 7cd8a42 | 2014-08-27 16:05:21 -0700 | [diff] [blame] | 10 | extends AbstractBlockAllocatorBasedIdGenerator<MatchActionId> { |
Ray Milkey | 9ed4b96 | 2014-08-20 15:43:40 -0700 | [diff] [blame] | 11 | |
Sho SHIMIZU | d4683b6 | 2014-08-27 15:19:09 -0700 | [diff] [blame] | 12 | /** |
| 13 | * Creates a FlowId generator instance using specified ID block allocator. |
| 14 | * |
| 15 | * @param allocator the ID block allocator to be used |
| 16 | */ |
| 17 | public MatchActionIdGeneratorWithIdBlockAllocator(IdBlockAllocator allocator) { |
Sho SHIMIZU | 7cd8a42 | 2014-08-27 16:05:21 -0700 | [diff] [blame] | 18 | super(allocator); |
Sho SHIMIZU | d4683b6 | 2014-08-27 15:19:09 -0700 | [diff] [blame] | 19 | } |
Ray Milkey | 9ed4b96 | 2014-08-20 15:43:40 -0700 | [diff] [blame] | 20 | |
Sho SHIMIZU | d4683b6 | 2014-08-27 15:19:09 -0700 | [diff] [blame] | 21 | @Override |
Sho SHIMIZU | 7cd8a42 | 2014-08-27 16:05:21 -0700 | [diff] [blame] | 22 | protected MatchActionId convertFrom(long value) { |
| 23 | return new MatchActionId(value); |
Sho SHIMIZU | d4683b6 | 2014-08-27 15:19:09 -0700 | [diff] [blame] | 24 | } |
Ray Milkey | 9ed4b96 | 2014-08-20 15:43:40 -0700 | [diff] [blame] | 25 | } |