hu.mta.sztaki.lpds.cloud.simulator.iaas.resourcemodel
Class ResourceSpreader.FreqSyncer
java.lang.Object
hu.mta.sztaki.lpds.cloud.simulator.Timed
hu.mta.sztaki.lpds.cloud.simulator.iaas.resourcemodel.ResourceSpreader.FreqSyncer
- All Implemented Interfaces:
- Comparable<Timed>
- Enclosing class:
- ResourceSpreader
public static class ResourceSpreader.FreqSyncer
- extends Timed
Methods inherited from class hu.mta.sztaki.lpds.cloud.simulator.Timed |
calcTimeJump, compareTo, fire, getFireCount, getFrequency, getNextEvent, getNextFire, isSubscribed, jumpTime, nextEventDistance, resetTimed, setBackPreference, simulateUntil, simulateUntilLastEvent, skipEventsTill, subscribe, unsubscribe, updateFrequency |
myDepGroup
private ResourceSpreader[] myDepGroup
- myDepGroup is always kept in order: first all the providers are
listed, then all the consumers, when dealing with this data member
please keep in mind this expected behavior.
depgrouplen
private int depgrouplen
firstConsumerId
private int firstConsumerId
depGroupExtension
private final ArrayList<ResourceSpreader> depGroupExtension
nudged
private boolean nudged
regularFreqMode
private boolean regularFreqMode
ResourceSpreader.FreqSyncer
private ResourceSpreader.FreqSyncer(ResourceSpreader provider,
ResourceSpreader consumer)
ResourceSpreader.FreqSyncer
private ResourceSpreader.FreqSyncer(ResourceSpreader[] myDepGroup,
int provcount,
int dglen)
addSingleToDG
private void addSingleToDG(ResourceSpreader rs)
- Should only be used from addToGroup!
- Parameters:
rs
-
addToGroup
private void addToGroup()
isInDepGroup
private boolean isInDepGroup(ResourceSpreader lookfor)
nudge
void nudge()
getDepGroup
ResourceSpreader[] getDepGroup()
- Only those should get the depgroup with this function who are not
planning to change it's contents
WARNING: If, for some reason, the contents of the returned array are
changed then the proper operation of FreqSyncer cannot be guaranteed
anymore.
- Returns:
getDGLen
public int getDGLen()
getClonedDepGroup
public ResourceSpreader[] getClonedDepGroup()
- This will always give a fresh copy of the depgroup which can be
changed as the user desires. Because of the always copying behavior
it will reduce the performance a little.
- Returns:
toString
public String toString()
- Overrides:
toString
in class Timed
getFirstConsumerId
public int getFirstConsumerId()
outOfOrderProcessing
protected final void outOfOrderProcessing(long currentTime)
tick
public void tick(long fires)
- Specified by:
tick
in class Timed
updateMyFreqNow
private void updateMyFreqNow()
isRegularFreqMode
public boolean isRegularFreqMode()
buildDepGroup
private void buildDepGroup(ResourceSpreader startingItem)
Copyright © 2012–2015 University of Innsbruck & MTA SZTAKI. All rights reserved.