Interface FlowObjectiveStore
-
- All Superinterfaces:
Store<ObjectiveEvent,FlowObjectiveStoreDelegate>
@Beta public interface FlowObjectiveStore extends Store<ObjectiveEvent,FlowObjectiveStoreDelegate>
The flow objective store.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intallocateNextId()Allocates a next objective id.java.util.Map<java.lang.Integer,NextGroup>getAllGroups()Fetch all groups from the store and their mapping to nextIds.NextGroupgetNextGroup(java.lang.Integer nextId)Fetch a next group from the store.voidputNextGroup(java.lang.Integer nextId, NextGroup group)Adds a NextGroup to the store, by mapping it to the nextId as key, and replacing any previous mapping.NextGroupremoveNextGroup(java.lang.Integer nextId)Remove a next group mapping from the store.-
Methods inherited from interface org.onosproject.store.Store
hasDelegate, setDelegate, unsetDelegate
-
-
-
-
Method Detail
-
putNextGroup
void putNextGroup(java.lang.Integer nextId, NextGroup group)Adds a NextGroup to the store, by mapping it to the nextId as key, and replacing any previous mapping.- Parameters:
nextId- an integergroup- a next group opaque object
-
getNextGroup
NextGroup getNextGroup(java.lang.Integer nextId)
Fetch a next group from the store.- Parameters:
nextId- an integer used as key- Returns:
- a next group, or null if group was not found
-
removeNextGroup
NextGroup removeNextGroup(java.lang.Integer nextId)
Remove a next group mapping from the store.- Parameters:
nextId- the key to remove from the store.- Returns:
- the next group which mapped to the nextId and is now removed, or null if no group mapping existed in the store
-
getAllGroups
java.util.Map<java.lang.Integer,NextGroup> getAllGroups()
Fetch all groups from the store and their mapping to nextIds.- Returns:
- a map that represents the current snapshot of Next-ids to NextGroups
-
allocateNextId
int allocateNextId()
Allocates a next objective id. This id is globally unique- Returns:
- an integer
-
-