|
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.WorkingSet
public class WorkingSet
Resource Working Set.
It is guarantueed that the Working Set always contains and locks the input data of running Tasks.
It is guarantueed that the Working Set size is never larger than the cache size of the Resource that is managed.
When a data id is added to, or cleared from, the WorkingSet, the ResourceManager ResourceDataTracker is updated.
Constructor Summary | |
---|---|
WorkingSet(Peer managed_peer,
ResourceHandle rh,
ResourceDataTracker data_tracker)
Constructs a new WorkingSet. |
Method Summary | |
---|---|
boolean |
addLocalData(MetaGridData data)
Note: the Resource-level DataTracker is updated by this operation |
boolean |
addLocalData(MetaGridData[] ds)
Note: the Resource-level DataTracker is updated by this operation |
boolean |
addSupplyingData(MetaGridData data)
Note: the Resource-level DataTracker is updated by this operation |
boolean |
addSupplyingData(MetaGridData[] ds)
Note: the Resource-level DataTracker is updated by this operation |
int |
availableCapacity()
Returns the nominal data storage available capacity (i.e. |
void |
clearAddAndLockLocalInputData(Task t)
Clears WorkingSet, then add-and-lock target Local data. |
void |
clearAddAndLockSupplyingInputData(Task t)
Clears WorkingSet, then add-and-lock target Supplying data. |
void |
clearAllUnlockedData()
Note: the Resource-level DataTracker is updated by this operation |
void |
clearLocalUnlockedData()
Note: the Resource-level DataTracker is updated by this operation |
void |
clearSupplyingUnlockedData()
Note: the Resource-level DataTracker is updated by this operation |
boolean |
containsData(MetaGridData data)
|
boolean |
containsLocalData(MetaGridData data)
|
boolean |
containsSupplyingData(MetaGridData data)
|
GridData[][] |
getData()
Returns the GridData stored in the WorkingSet, so as to communicate them to the managed Resource. |
java.lang.String[] |
getDataId()
|
GridData[][] |
getLocalData()
|
java.lang.String[] |
getLocalDataId()
|
MetaGridData[] |
getLocalGridMetaData()
|
MetaGridData[] |
getMetaGridData()
|
GridData[][] |
getSupplyingData()
|
java.lang.String[] |
getSupplyingDataId()
|
MetaGridData[] |
getSupplyingMetaGridData()
|
int |
localSize()
Returns the number of stored Local data. |
int |
lockedSize()
Returns the number of locked data (whether Local or Supplying). |
ResourceHandle |
managedResource()
Managed Resource Handle. |
int |
nominalCapacity()
Returns the nominal data storage nominal capacity. |
int |
size()
Returns the number of all stored data. |
int |
supplyingSize()
Returns the number of stored Supplying data. |
java.lang.String |
toString()
|
void |
unlockLocalInputData(Task t)
|
void |
unlockSupplyingInputData(Task t)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WorkingSet(Peer managed_peer, ResourceHandle rh, ResourceDataTracker data_tracker) throws GridException
managed_peer
- managed Peerrh
- managed Resource Handledata_tracker
- managed Peer Data Tracker
GridException
- if a parameter is illegalMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public ResourceHandle managedResource()
public int nominalCapacity()
public int size()
public int localSize()
public int supplyingSize()
public int lockedSize()
public int availableCapacity()
public boolean containsData(MetaGridData data) throws GridException
GridException
public boolean containsLocalData(MetaGridData data) throws GridException
GridException
public boolean containsSupplyingData(MetaGridData data) throws GridException
GridException
public java.lang.String[] getDataId() throws GridException
GridException
public java.lang.String[] getLocalDataId() throws GridException
GridException
public java.lang.String[] getSupplyingDataId() throws GridException
GridException
public GridData[][] getData() throws GridException
GridException
public GridData[][] getLocalData() throws GridException
GridException
public GridData[][] getSupplyingData() throws GridException
GridException
public MetaGridData[] getMetaGridData() throws GridException
GridException
public MetaGridData[] getLocalGridMetaData() throws GridException
GridException
public MetaGridData[] getSupplyingMetaGridData() throws GridException
GridException
public void clearAllUnlockedData() throws GridException
Note: the Resource-level DataTracker is updated by this operation
GridException
public void clearLocalUnlockedData() throws GridException
Note: the Resource-level DataTracker is updated by this operation
GridException
public void clearSupplyingUnlockedData() throws GridException
Note: the Resource-level DataTracker is updated by this operation
GridException
public void clearAddAndLockLocalInputData(Task t) throws GridException
GridException
public void clearAddAndLockSupplyingInputData(Task t) throws GridException
GridException
public void unlockLocalInputData(Task t) throws GridException
GridException
public void unlockSupplyingInputData(Task t) throws GridException
GridException
public boolean addLocalData(MetaGridData data) throws GridException
Note: the Resource-level DataTracker is updated by this operation
GridException
public boolean addSupplyingData(MetaGridData data) throws GridException
Note: the Resource-level DataTracker is updated by this operation
GridException
public boolean addLocalData(MetaGridData[] ds) throws GridException
Note: the Resource-level DataTracker is updated by this operation
GridException
public boolean addSupplyingData(MetaGridData[] ds) throws GridException
Note: the Resource-level DataTracker is updated by this operation
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.