Jonathan Hart | aa38097 | 2014-04-03 10:24:46 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.intent.runtime; |
Toshio Koide | 066506e | 2014-02-20 19:52:09 -0800 | [diff] [blame] | 2 | |
| 3 | import java.util.HashMap; |
TeruU | f911165 | 2014-05-14 23:10:35 -0700 | [diff] [blame] | 4 | import java.util.HashSet; |
| 5 | import java.util.Map; |
| 6 | import java.util.Map.Entry; |
| 7 | import java.util.Set; |
Toshio Koide | 066506e | 2014-02-20 19:52:09 -0800 | [diff] [blame] | 8 | |
Jonathan Hart | aa38097 | 2014-04-03 10:24:46 -0700 | [diff] [blame] | 9 | import net.onrc.onos.core.intent.Intent.IntentState; |
TeruU | f911165 | 2014-05-14 23:10:35 -0700 | [diff] [blame] | 10 | public class IntentStateList { |
| 11 | protected Map<String, IntentState> intentMap; |
| 12 | public Set<Long> domainSwitchDpids; |
Toshio Koide | 066506e | 2014-02-20 19:52:09 -0800 | [diff] [blame] | 13 | |
TeruU | f911165 | 2014-05-14 23:10:35 -0700 | [diff] [blame] | 14 | public IntentStateList() { |
| 15 | intentMap = new HashMap<String, IntentState>(); |
| 16 | domainSwitchDpids = new HashSet<Long>(); |
| 17 | } |
| 18 | |
| 19 | public IntentState put(String id, IntentState state) { |
| 20 | return intentMap.put(id, state); |
| 21 | } |
| 22 | |
| 23 | public Set<Entry<String, IntentState>> entrySet() { |
| 24 | return intentMap.entrySet(); |
| 25 | } |
| 26 | |
| 27 | public void clear() { |
| 28 | intentMap.clear(); |
| 29 | } |
Toshio Koide | 066506e | 2014-02-20 19:52:09 -0800 | [diff] [blame] | 30 | } |