|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ExhibitPropsComputableMutableVoteCacheIF
Interface for retrieving/calculating votes and correlations.
| Field Summary | |
|---|---|
static ExhibitPropsComputableMutableVoteCacheIF |
TRIVIAL
Trivial cache that doesn't actually cache anything, nor compute anything except the basic vote factor. |
| Method Summary | |
|---|---|
ExhibitPropsComputableMutable.Factor |
calcVoteFactor(java.lang.String exhibitName,
AllExhibitProperties aep,
BasicVarMgrInterface vars)
Compute exactly one Factor that depends on explicit user votes for the specified exhibit; never null. |
ExhibitPropsComputableMutable.Factor[] |
getCorrelates(ExhibitStaticAttr esa,
AllExhibitProperties aep,
BasicVarMgrInterface vars,
boolean force)
Get correlates for specified exhibit; never null but result may be empty. |
java.lang.Boolean |
isCategoryGood(java.lang.String categoryDir,
AllExhibitProperties aep,
BasicVarMgrInterface vars,
boolean force)
Find out if a category is rated "good"/popular or not. |
void |
update(AllExhibitProperties aep,
BasicVarMgrInterface vars,
boolean noTimeLimit)
Bring correlations data up to date. |
| Field Detail |
|---|
static final ExhibitPropsComputableMutableVoteCacheIF TRIVIAL
| Method Detail |
|---|
ExhibitPropsComputableMutable.Factor calcVoteFactor(java.lang.String exhibitName,
AllExhibitProperties aep,
BasicVarMgrInterface vars)
throws java.io.IOException
If this cannot fetch some of the data it requires due to an IOException (not the same as fetching data successfully that has no entries) then the exception is propagated to the caller. (Normally this results in the EPCM item for which this is called being marked stale so that we can try again when the data is available.)
This may cache values once computed for efficiency.
The returned factor's goodness can range from -1 to +1, and confidence from 0 to +1; any scaling required will have to be applied elsewhere.
java.io.IOException - if this was unable to fetch some data required
ExhibitPropsComputableMutable.Factor[] getCorrelates(ExhibitStaticAttr esa,
AllExhibitProperties aep,
BasicVarMgrInterface vars,
boolean force)
throws java.io.IOException
The goodness of each Factor is either -1 or +1, with the correlation/confidence ranging between 0 and 1.
This will return values computed up to one period ago if need be, to help avoid a sudden splurge of CPU effort as we tick from one period to the next.
No particular ordering of the results is guaranteed, but there will be no duplicates and no nulls.
force - if true, force complete computation if need be,
else we will just return what we have in cache;
complete recomputation may be expensive but should last a long time
and we will abort with an IOException if we cannot complete
the recomputation in a reasonable time
java.io.IOException - cannot extract required correlates
java.lang.Boolean isCategoryGood(java.lang.String categoryDir,
AllExhibitProperties aep,
BasicVarMgrInterface vars,
boolean force)
throws java.io.IOException
categoryDir - the initial directory component of an extant exhibitforce - if true may force (expensive) computation to give
a more accurate answer,
else may return a more approximate or stale answer,
or none at all (null)
java.io.IOException
void update(AllExhibitProperties aep,
BasicVarMgrInterface vars,
boolean noTimeLimit)
throws java.io.IOException
This may be a relatively expensive call.
This is thread-safe, though calling from more than one thread at once may result in redundant work being performed.
aep - current exhibit properties; never nullvars - handle on system variables; never nullnoTimeLimit - if true, this runs until complete if possible
java.io.IOException
|
DHD Multimedia Gallery V1.50.55 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||