Toshio Koide | b8cea26 | 2014-08-12 18:45:46 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.flowmanager; |
| 2 | |
Toshio Koide | fc5acc7 | 2014-08-12 18:45:46 -0700 | [diff] [blame] | 3 | import net.onrc.onos.api.flowmanager.FlowBatchHandle; |
| 4 | import net.onrc.onos.api.flowmanager.FlowBatchId; |
| 5 | import net.onrc.onos.api.flowmanager.FlowBatchOperation; |
| 6 | import net.onrc.onos.api.flowmanager.FlowBatchState; |
| 7 | |
Toshio Koide | b8cea26 | 2014-08-12 18:45:46 -0700 | [diff] [blame] | 8 | /** |
| 9 | * Manages the set of flow operations throughout the ONOS instances. |
| 10 | */ |
| 11 | public class FlowOperationMap { |
Toshio Koide | fc5acc7 | 2014-08-12 18:45:46 -0700 | [diff] [blame] | 12 | public FlowBatchHandle putOperation(FlowBatchOperation ops) { |
| 13 | FlowBatchId id = getUniqueBatchOperationId(); |
| 14 | if (id == null) { |
| 15 | return null; |
| 16 | } |
| 17 | if (putBatchOperation(id, ops)) { |
| 18 | return null; |
| 19 | } |
| 20 | |
| 21 | return new FlowBatchHandle(this, id); |
| 22 | } |
| 23 | |
| 24 | public void setState(long id, FlowBatchState state) { |
| 25 | // TODO implement it |
| 26 | } |
| 27 | |
| 28 | public FlowBatchOperation getOperation(long id) { |
| 29 | // TODO implement it |
| 30 | return null; |
| 31 | } |
| 32 | |
| 33 | public FlowBatchState getState(FlowBatchId id) { |
| 34 | // TODO implement it |
| 35 | return null; |
| 36 | } |
| 37 | |
| 38 | // ====== private methods |
| 39 | |
| 40 | private FlowBatchId getUniqueBatchOperationId() { |
| 41 | // TODO implement it |
| 42 | return null; |
| 43 | } |
| 44 | |
| 45 | private boolean putBatchOperation(FlowBatchId id, FlowBatchOperation ops) { |
| 46 | // TODO implement it |
| 47 | return false; |
| 48 | } |
Toshio Koide | b8cea26 | 2014-08-12 18:45:46 -0700 | [diff] [blame] | 49 | } |