Skip to content
Snippets Groups Projects
Commit 7674fa0a authored by Srinivasan Ramasubramanian's avatar Srinivasan Ramasubramanian
Browse files

rename writeLink to writeLinkToStorage. Make these methods protected so...

rename writeLink to writeLinkToStorage.  Make these methods protected so others can extend them if needed.
parent aaf96168
No related branches found
No related tags found
No related merge requests found
...@@ -792,7 +792,7 @@ IFloodlightModule, IInfoProvider, IHAListener { ...@@ -792,7 +792,7 @@ IFloodlightModule, IInfoProvider, IHAListener {
if (newInfo.getUnicastValidTime() == null) if (newInfo.getUnicastValidTime() == null)
addLinkToBroadcastDomain(lt); addLinkToBroadcastDomain(lt);
writeLink(lt, newInfo); writeLinkToStorage(lt, newInfo);
updateOperation = UpdateOperation.LINK_UPDATED; updateOperation = UpdateOperation.LINK_UPDATED;
linkChanged = true; linkChanged = true;
...@@ -847,7 +847,7 @@ IFloodlightModule, IInfoProvider, IHAListener { ...@@ -847,7 +847,7 @@ IFloodlightModule, IInfoProvider, IHAListener {
// Write changes to storage. This will always write the updated // Write changes to storage. This will always write the updated
// valid time, plus the port states if they've changed (i.e. if // valid time, plus the port states if they've changed (i.e. if
// they weren't set to null in the previous block of code. // they weren't set to null in the previous block of code.
writeLink(lt, newInfo); writeLinkToStorage(lt, newInfo);
if (linkChanged) { if (linkChanged) {
updateOperation = getUpdateOperation(newInfo.getSrcPortState(), updateOperation = getUpdateOperation(newInfo.getSrcPortState(),
...@@ -1021,7 +1021,7 @@ IFloodlightModule, IInfoProvider, IHAListener { ...@@ -1021,7 +1021,7 @@ IFloodlightModule, IInfoProvider, IHAListener {
lt.getDst(), lt.getDstPort(), lt.getDst(), lt.getDstPort(),
getLinkType(lt, linkInfo), getLinkType(lt, linkInfo),
operation)); operation));
writeLink(lt, linkInfo); writeLinkToStorage(lt, linkInfo);
linkInfoChanged = true; linkInfoChanged = true;
} }
} }
...@@ -1281,7 +1281,7 @@ IFloodlightModule, IInfoProvider, IHAListener { ...@@ -1281,7 +1281,7 @@ IFloodlightModule, IInfoProvider, IHAListener {
* @param lt The LinkTuple to write * @param lt The LinkTuple to write
* @param linkInfo The LinkInfo to write * @param linkInfo The LinkInfo to write
*/ */
void writeLink(Link lt, LinkInfo linkInfo) { protected void writeLinkToStorage(Link lt, LinkInfo linkInfo) {
LinkType type = getLinkType(lt, linkInfo); LinkType type = getLinkType(lt, linkInfo);
// Write only direct links. Do not write links to external // Write only direct links. Do not write links to external
...@@ -1368,7 +1368,7 @@ IFloodlightModule, IInfoProvider, IHAListener { ...@@ -1368,7 +1368,7 @@ IFloodlightModule, IInfoProvider, IHAListener {
* Removes a link from storage using an asynchronous call. * Removes a link from storage using an asynchronous call.
* @param lt The LinkTuple to delete. * @param lt The LinkTuple to delete.
*/ */
void removeLinkFromStorage(Link lt) { protected void removeLinkFromStorage(Link lt) {
String id = getLinkId(lt); String id = getLinkId(lt);
storageSource.deleteRowAsync(LINK_TABLE_NAME, id); storageSource.deleteRowAsync(LINK_TABLE_NAME, id);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment