@Service public class DistributedCastorStore extends Object implements CastorStore
| Modifier and Type | Field and Description |
|---|---|
protected StorageService |
storageService |
| Constructor and Description |
|---|
DistributedCastorStore() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate() |
protected void |
deactivate() |
Map<org.onlab.packet.IpAddress,org.onlab.packet.MacAddress> |
getAddressMap()
Returns the map of currently known mac addresses from ARP.
|
Set<Peer> |
getAllPeers()
Returns list of all peers including the route servers.
|
Set<Peer> |
getCustomers()
Returns the list of added BGP Peers.
|
Map<String,String> |
getCustomersMap()
Returns the mapping of Customer names to their IP address.
|
Map<String,MultiPointToSinglePointIntent> |
getLayer2Intents()
Returns layer2 intents.
|
Map<Key,PointToPointIntent> |
getPeerIntents()
Returns all the peer intents.
|
Set<Peer> |
getServers()
Get the Route Servers.
|
void |
removeCustomer(Peer peer)
Removes a customer and its associated flows from the network.
|
void |
removeLayer2Intent(String key)
Removes the layer2 intent from the store.
|
void |
removePeerIntent(Key key)
Removes a peer intent from the store.
|
void |
setAddressMap(org.onlab.packet.IpAddress ip,
org.onlab.packet.MacAddress mac)
Sets the mapping from IP address to Mac.
|
void |
storeCustomer(Peer customer)
Store a Customer.
|
void |
storeLayer2Intent(String key,
MultiPointToSinglePointIntent intent)
Stores a layer2 intent.
|
void |
storePeer(Peer peer)
Store a Peer.
|
void |
storePeerIntent(Key key,
PointToPointIntent intent)
Stores a Peer Intent.
|
void |
storeServer(Peer server)
Store a Route Server.
|
@Reference(cardinality=MANDATORY_UNARY) protected StorageService storageService
@Activate protected void activate()
@Deactivate protected void deactivate()
public Set<Peer> getAllPeers()
CastorStoregetAllPeers in interface CastorStorepublic void storePeer(Peer peer)
CastorStorestorePeer in interface CastorStorepeer - The Peer to storepublic Set<Peer> getServers()
CastorStoregetServers in interface CastorStorepublic void storeServer(Peer server)
CastorStorestoreServer in interface CastorStoreserver - The Serverpublic Set<Peer> getCustomers()
CastorStoregetCustomers in interface CastorStorepublic void storeCustomer(Peer customer)
CastorStorestoreCustomer in interface CastorStorecustomer - The Customer to be storedpublic Map<org.onlab.packet.IpAddress,org.onlab.packet.MacAddress> getAddressMap()
CastorStoregetAddressMap in interface CastorStorepublic void setAddressMap(org.onlab.packet.IpAddress ip,
org.onlab.packet.MacAddress mac)
CastorStoresetAddressMap in interface CastorStoreip - IP Addressmac - MAC Addresspublic Map<Key,PointToPointIntent> getPeerIntents()
CastorStoregetPeerIntents in interface CastorStorepublic void storePeerIntent(Key key, PointToPointIntent intent)
CastorStorestorePeerIntent in interface CastorStorekey - The intentintent - Keypublic Map<String,MultiPointToSinglePointIntent> getLayer2Intents()
CastorStoregetLayer2Intents in interface CastorStorepublic void storeLayer2Intent(String key, MultiPointToSinglePointIntent intent)
CastorStorestoreLayer2Intent in interface CastorStorekey - Keyintent - The intentpublic Map<String,String> getCustomersMap()
CastorStoregetCustomersMap in interface CastorStorepublic void removeCustomer(Peer peer)
CastorStoreremoveCustomer in interface CastorStorepeer - The Customerpublic void removePeerIntent(Key key)
CastorStoreremovePeerIntent in interface CastorStorekey - Key for the intentpublic void removeLayer2Intent(String key)
CastorStoreremoveLayer2Intent in interface CastorStorekey - Key for intent