class CandidateHarvesterSetElement extends Object
Modifier and Type | Field and Description |
---|---|
private boolean |
enabled
The indicator which determines whether
CandidateHarvester.harvest(org.ice4j.ice.Component) is to be
called on harvester . |
private CandidateHarvester |
harvester
The CandidateHarvester which is an element in a
CandidateHarvesterSet.
|
private static Logger |
logger
The Logger used by the CandidateHarvesterSetElement
class and its instances for logging output.
|
Constructor and Description |
---|
CandidateHarvesterSetElement(CandidateHarvester harvester)
Initializes a new CandidateHarvesterSetElement instance
which is to represent a specific CandidateHarvester as an
element in a CandidateHarvesterSet.
|
Modifier and Type | Method and Description |
---|---|
CandidateHarvester |
getHarvester()
Returns the CandidateHarvester encapsulated by this element.
|
void |
harvest(Component component,
TrickleCallback trickleCallback)
Calls
CandidateHarvester.harvest(org.ice4j.ice.Component) on the
associated CandidateHarvester if enabled. |
boolean |
harvesterEquals(CandidateHarvester harvester)
Determines whether the associated CandidateHarvester is
considered to be the same as a specific CandidateHarvester.
|
boolean |
isEnabled()
Gets the indicator which determines whether
CandidateHarvester.harvest(Component) is to be called on the
associated CandidateHarvester. |
void |
setEnabled(boolean enabled)
Sets the indicator which determines whether
CandidateHarvester.harvest(Component) is to be called on the
associated CandidateHarvester. |
private void |
startHarvestTiming()
Starts the harvesting timer.
|
private void |
stopHarvestTiming(Collection<LocalCandidate> harvest)
Stops the harvesting timer.
|
private static final Logger logger
private boolean enabled
CandidateHarvester.harvest(org.ice4j.ice.Component)
is to be
called on harvester
.private final CandidateHarvester harvester
public CandidateHarvesterSetElement(CandidateHarvester harvester)
harvester
- the CandidateHarvester which is to be
represented as an element in a CandidateHarvesterSet by the
new instancepublic void harvest(Component component, TrickleCallback trickleCallback)
CandidateHarvester.harvest(org.ice4j.ice.Component)
on the
associated CandidateHarvester if enabled.component
- the Component to gather candidates fortrickleCallback
- the TrickleCallback
that we will be
feeding candidates to, or null in case the application doesn't
want us trickling any candidatespublic boolean harvesterEquals(CandidateHarvester harvester)
harvester
- the CandidateHarvester to be compared to
the associated CandidateHarvesterpublic boolean isEnabled()
CandidateHarvester.harvest(Component)
is to be called on the
associated CandidateHarvester.public void setEnabled(boolean enabled)
CandidateHarvester.harvest(Component)
is to be called on the
associated CandidateHarvester.enabled
- true if
CandidateHarvester#harvest(Component) is to be called on the
associated CandidateHarvester; otherwise, falsepublic CandidateHarvester getHarvester()
private void startHarvestTiming()
private void stopHarvestTiming(Collection<LocalCandidate> harvest)
harvest
- the harvest that we just concluded.Copyright © 2018. All rights reserved.