|
Lightweight Bartering Grid | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlbg.peer.core.rms.ResourceDataTracker
public class ResourceDataTracker
A ResourceDataTracker tracks the (Local and Supplying) data stored on all Resources of the Peer.
The tracked data are those sent in a WorkingSet to a Resource. To each data id is associated the set of Resources where the data has been sent.
The tracked data can be searched to locate Resources following various criteria using the Storage Affinity metric. Of particular interest is the locateIdleResourceWithBestStorageAffinity() method.
Nested Class Summary | |
---|---|
static class |
ResourceDataTracker.TransferCostData
Helper class of Data Tracker. |
Constructor Summary | |
---|---|
ResourceDataTracker(Peer managed_peer)
Constructs a new ResourceDataTracker. |
Method Summary | |
---|---|
java.util.Set<ResourceDataTracker.TransferCostData> |
locateIdleResourcesWithStorageAffinity(Task t)
Deprecated. |
ResourceHandle |
locateIdleResourceWithBestStorageAffinity(Task t)
Locate best (Storage Affinity-wise) Resource which has a mximum of data required by target Task in her WorkingSet. |
java.lang.String |
locateLessLocallyReplicatedData(java.lang.String[] data_ids)
Locate data in target data set that is the less replicated on this Peer Resources. |
java.lang.String |
locateMostLocallyReplicatedData(java.lang.String[] data_ids)
Locate data in target data set that is the most replicated on this Peer Resources. |
java.util.Set<ResourceHandle> |
locateResourcesWithReplicatedData(java.lang.String data_id)
Locate Resources which have target data in their WorkingSet. |
java.util.Set<ResourceHandle> |
locateResourcesWithReplicatedData(java.lang.String[] data_ids)
Locate Resources which have all target datas in their WorkingSet. |
java.lang.String |
toString()
|
boolean |
trackData(java.lang.String data_id,
ResourceHandle rh)
|
void |
untrackAllData(java.lang.String[] data_ids,
ResourceHandle rh)
Untrack all data for target Resource. |
void |
untrackData(java.lang.String[] data_ids,
ResourceHandle rh)
|
void |
untrackData(java.lang.String data_id,
ResourceHandle rh)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ResourceDataTracker(Peer managed_peer) throws GridException
GridException
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public boolean trackData(java.lang.String data_id, ResourceHandle rh) throws GridException
GridException
public void untrackData(java.lang.String data_id, ResourceHandle rh) throws GridException
GridException
public void untrackData(java.lang.String[] data_ids, ResourceHandle rh) throws GridException
GridException
public void untrackAllData(java.lang.String[] data_ids, ResourceHandle rh) throws GridException
GridException
public java.util.Set<ResourceHandle> locateResourcesWithReplicatedData(java.lang.String data_id) throws GridException
GridException
public java.util.Set<ResourceHandle> locateResourcesWithReplicatedData(java.lang.String[] data_ids) throws GridException
GridException
@Deprecated public java.util.Set<ResourceDataTracker.TransferCostData> locateIdleResourcesWithStorageAffinity(Task t) throws GridException
GridException
public ResourceHandle locateIdleResourceWithBestStorageAffinity(Task t) throws GridException
If there are several such Resources, the one with the largest number of unused cache slots (i.e. free space) is selected.
GridException
public java.lang.String locateMostLocallyReplicatedData(java.lang.String[] data_ids) throws GridException
GridException
public java.lang.String locateLessLocallyReplicatedData(java.lang.String[] data_ids) throws GridException
GridException
|
Lightweight Bartering Grid | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.