@Service public class SimpleVirtualIntentStore extends AbstractVirtualStore<org.onosproject.net.intent.IntentEvent,org.onosproject.net.intent.IntentStoreDelegate> implements VirtualNetworkIntentStore
| Modifier and Type | Class and Description |
|---|---|
class |
SimpleVirtualIntentStore.SystemClockTimestamp |
delegateMap| Constructor and Description |
|---|
SimpleVirtualIntentStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
addPending(NetworkId networkId,
org.onosproject.net.intent.IntentData data)
Adds a new operation, which should be persisted and delegated.
|
void |
batchWrite(NetworkId networkId,
java.lang.Iterable<org.onosproject.net.intent.IntentData> updates)
Writes a batch of IntentData objects to the store.
|
void |
deactivate() |
java.util.List<org.onosproject.net.intent.Intent> |
getInstallableIntents(NetworkId networkId,
org.onosproject.net.intent.Key intentKey)
Returns the list of the installable events associated with the specified
original intent.
|
org.onosproject.net.intent.Intent |
getIntent(NetworkId networkId,
org.onosproject.net.intent.Key key)
Returns the intent with the specified identifier.
|
long |
getIntentCount(NetworkId networkId)
Returns the number of intents in the store.
|
java.lang.Iterable<org.onosproject.net.intent.IntentData> |
getIntentData(NetworkId networkId,
boolean localOnly,
long olderThan)
Returns an iterable of all intent data objects in the store.
|
org.onosproject.net.intent.IntentData |
getIntentData(NetworkId networkId,
org.onosproject.net.intent.Key key)
Returns the intent data object associated with the specified key.
|
java.lang.Iterable<org.onosproject.net.intent.Intent> |
getIntents(NetworkId networkId)
Returns an iterable of all intents in the store.
|
org.onosproject.net.intent.IntentState |
getIntentState(NetworkId networkId,
org.onosproject.net.intent.Key intentKey)
Returns the state of the specified intent.
|
java.lang.Iterable<org.onosproject.net.intent.Intent> |
getPending(NetworkId networkId)
Returns the intent requests pending processing.
|
java.lang.Iterable<org.onosproject.net.intent.IntentData> |
getPendingData(NetworkId networkId)
Returns the intent data objects that are pending processing.
|
java.lang.Iterable<org.onosproject.net.intent.IntentData> |
getPendingData(NetworkId networkId,
boolean localOnly,
long olderThan)
Returns the intent data objects that are pending processing for longer
than the specified duration.
|
org.onosproject.net.intent.IntentData |
getPendingData(NetworkId networkId,
org.onosproject.net.intent.Key intentKey)
Returns the intent data object that are pending processing for a specfied
key.
|
boolean |
isMaster(NetworkId networkId,
org.onosproject.net.intent.Key intentKey)
Checks to see whether the calling instance is the master for processing
this intent, or more specifically, the key contained in this intent.
|
void |
write(NetworkId networkId,
org.onosproject.net.intent.IntentData newData)
Writes an IntentData object to the store.
|
hasDelegate, notifyDelegate, notifyDelegate, setDelegate, unsetDelegateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasDelegate, setDelegate, unsetDelegate@Activate public void activate()
@Deactivate public void deactivate()
public long getIntentCount(NetworkId networkId)
VirtualNetworkIntentStoregetIntentCount in interface VirtualNetworkIntentStorenetworkId - the virtual network identifierpublic java.lang.Iterable<org.onosproject.net.intent.Intent> getIntents(NetworkId networkId)
VirtualNetworkIntentStoregetIntents in interface VirtualNetworkIntentStorenetworkId - the virtual network identifierpublic java.lang.Iterable<org.onosproject.net.intent.IntentData> getIntentData(NetworkId networkId, boolean localOnly, long olderThan)
VirtualNetworkIntentStoregetIntentData in interface VirtualNetworkIntentStorenetworkId - the virtual network identifierlocalOnly - should only intents for which this instance is master
be returnedolderThan - specified duration in milliseconds (0 for "now")public org.onosproject.net.intent.IntentState getIntentState(NetworkId networkId, org.onosproject.net.intent.Key intentKey)
VirtualNetworkIntentStoregetIntentState in interface VirtualNetworkIntentStorenetworkId - the virtual network identifierintentKey - intent identificationpublic java.util.List<org.onosproject.net.intent.Intent> getInstallableIntents(NetworkId networkId, org.onosproject.net.intent.Key intentKey)
VirtualNetworkIntentStoregetInstallableIntents in interface VirtualNetworkIntentStorenetworkId - the virtual network identifierintentKey - original intent identifierpublic void write(NetworkId networkId, org.onosproject.net.intent.IntentData newData)
VirtualNetworkIntentStorewrite in interface VirtualNetworkIntentStorenetworkId - the virtual network identifiernewData - new intent data to writepublic void batchWrite(NetworkId networkId, java.lang.Iterable<org.onosproject.net.intent.IntentData> updates)
VirtualNetworkIntentStorebatchWrite in interface VirtualNetworkIntentStorenetworkId - the virtual network identifierupdates - collection of intent data objects to writepublic org.onosproject.net.intent.Intent getIntent(NetworkId networkId, org.onosproject.net.intent.Key key)
VirtualNetworkIntentStoregetIntent in interface VirtualNetworkIntentStorenetworkId - the virtual network identifierkey - keypublic org.onosproject.net.intent.IntentData getIntentData(NetworkId networkId, org.onosproject.net.intent.Key key)
VirtualNetworkIntentStoregetIntentData in interface VirtualNetworkIntentStorenetworkId - the virtual network identifierkey - key to look uppublic void addPending(NetworkId networkId, org.onosproject.net.intent.IntentData data)
VirtualNetworkIntentStoreaddPending in interface VirtualNetworkIntentStorenetworkId - the virtual network identifierdata - operationpublic boolean isMaster(NetworkId networkId, org.onosproject.net.intent.Key intentKey)
VirtualNetworkIntentStoreisMaster in interface VirtualNetworkIntentStorenetworkId - the virtual network identifierintentKey - intentKey to checkpublic java.lang.Iterable<org.onosproject.net.intent.Intent> getPending(NetworkId networkId)
VirtualNetworkIntentStoregetPending in interface VirtualNetworkIntentStorenetworkId - the virtual network identifierpublic java.lang.Iterable<org.onosproject.net.intent.IntentData> getPendingData(NetworkId networkId)
VirtualNetworkIntentStoregetPendingData in interface VirtualNetworkIntentStorenetworkId - the virtual network identifierpublic org.onosproject.net.intent.IntentData getPendingData(NetworkId networkId, org.onosproject.net.intent.Key intentKey)
VirtualNetworkIntentStoregetPendingData in interface VirtualNetworkIntentStorenetworkId - the virtual network identifierintentKey - key to look uppublic java.lang.Iterable<org.onosproject.net.intent.IntentData> getPendingData(NetworkId networkId, boolean localOnly, long olderThan)
VirtualNetworkIntentStoregetPendingData in interface VirtualNetworkIntentStorenetworkId - the virtual network identifierlocalOnly - should only intents for which this instance is master
be returnedolderThan - specified duration in milliseconds (0 for "now")