Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
floodlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
croft1
floodlight
Commits
6a2a30c5
Commit
6a2a30c5
authored
12 years ago
by
Ananth Suryanarayana
Browse files
Options
Downloads
Patches
Plain Diff
Commit missing call to addListener()
parent
9a272f01
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/net/floodlightcontroller/devicemanager/internal/DeviceManagerImpl.java
+16
-15
16 additions, 15 deletions
...tcontroller/devicemanager/internal/DeviceManagerImpl.java
with
16 additions
and
15 deletions
src/main/java/net/floodlightcontroller/devicemanager/internal/DeviceManagerImpl.java
+
16
−
15
View file @
6a2a30c5
...
...
@@ -634,11 +634,12 @@ IFlowReconcileListener, IInfoProvider, IHAListener {
floodlightProvider
.
addOFMessageListener
(
OFType
.
PACKET_IN
,
this
);
floodlightProvider
.
addHAListener
(
this
);
flowReconcileMgr
.
addFlowReconcileListener
(
this
);
entityClassifier
.
addListener
(
this
);
Runnable
ecr
=
new
Runnable
()
{
@Override
public
void
run
()
{
cleanupEntities
(
false
,
null
);
cleanupEntities
(
null
,
false
);
entityCleanupTask
.
reschedule
(
ENTITY_CLEANUP_INTERVAL
,
TimeUnit
.
SECONDS
);
}
...
...
@@ -1288,19 +1289,15 @@ IFlowReconcileListener, IInfoProvider, IHAListener {
* @param reclassify if true, begin an asynchronous task to reclassify the
* flushed entities
*/
private
void
flushEntityCache
(
IEntityClass
entityClass
,
boolean
reclassify
,
Set
<
String
>
entityClassChanged
)
{
private
void
flushEntityCache
(
Set
<
String
>
entityClassChangedSet
,
boolean
reclassify
)
{
if
(
reclassify
)
return
;
// TODO
if
(
entityClass
==
null
)
{
/*
* XXX This can be running at the same time by timer thread.
*/
cleanupEntities
(
true
,
entityClassChanged
);
}
else
{
// TODO
}
/*
* TODO This can be running at the same time by timer thread. Check
* and make sure that this is thread safe.
*/
cleanupEntities
(
entityClassChangedSet
,
true
);
}
// *********************
...
...
@@ -1312,15 +1309,19 @@ IFlowReconcileListener, IInfoProvider, IHAListener {
/*
* Flush the entire device entity cache for now.
*/
flushEntityCache
(
null
,
false
,
entityClassNames
);
flushEntityCache
(
entityClassNames
,
false
);
return
;
}
/**
* Clean up expired entities/devices
*
* @param[in] forceCleanup ForceCleanup of entities irrespective of age
* @param[in] specificEntities Cleanup only a specific set of entities
*/
protected
void
cleanupEntities
(
boolean
forceCleanup
,
Set
<
String
>
specificEntities
)
{
protected
void
cleanupEntities
(
Set
<
String
>
specificEntities
,
boolean
forceCleanup
)
{
Calendar
c
=
Calendar
.
getInstance
();
c
.
add
(
Calendar
.
MILLISECOND
,
-
ENTITY_TIMEOUT
);
Date
cutoff
=
c
.
getTime
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment