|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.svrCore.ExhibitPropsGlobalImmutable
public final class ExhibitPropsGlobalImmutable
This contains global immutable exhibit data over all exhibits that must live with the exhibits. This is data that does not apply to any one exhibit but is small and critical to handling of all exhibits.
Currently this contains:
This can include:
This has a hash computed over its contents to make it easy for users of this object to tell if it has changed since previous incarnations.
This object is immutable and Serializable, and tries to validate its contents upon deserialisation.
| Nested Class Summary | |
|---|---|
static class |
ExhibitPropsGlobalImmutable.EPGIDiff
Immutable record of the difference between two EPGI instances. |
private static class |
ExhibitPropsGlobalImmutable.PropertiesDiffResourceBundle
Thin wrapper/holder for a local treedesc resource bundle based on PropertiesDiff. |
private static class |
ExhibitPropsGlobalImmutable.RBControl
|
| Field Summary | |
|---|---|
private PropertiesDiff |
locationDB
The (immutable) location DB in properties format; null if absent. |
long |
locationDBTimestamp
The location DB timestamp; strictly positive, or zero if no/empty locationDB. |
private LocationMap |
locMap
The (immutable) LocationMap derived from the locationDB; never null. |
long |
longHash
The hash of all the data held; guaranteed non-negative. |
private static long |
serialVersionUID
Our serial version... |
private PropertiesBundleDiff |
treedesc
The (immutable) treedesc bundle; null if absent. |
long |
treedescTimestamp
The treedesc bundle timestamp; non-negative, or may be zero if locationDBis empty/absent. |
| Constructor Summary | |
|---|---|
ExhibitPropsGlobalImmutable()
Create an empty instance. |
|
ExhibitPropsGlobalImmutable(PropertiesDiff locationDB,
long locationDBTimestamp,
PropertiesBundleDiff treedesc,
long treedescTimestamp)
Create an instance. |
|
ExhibitPropsGlobalImmutable(java.util.Properties locationDB,
long locationDBTimestamp,
java.util.Map<java.lang.String,java.util.Properties> treedesc,
long treedescTimestamp)
Create an instance. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one; the underlying data is the same if true. |
java.lang.CharSequence |
getLocalisedTreeDescMessage(java.lang.String msgName,
java.util.Locale locale)
Gets the appropriate localised tree-description message; never null unless the key is null. |
LocationMap |
getLocationMap()
Get the LocationMap; never null. |
int |
getTreedescHash()
Get the hash of the treedesc; non-negative, or may be zero if treedesc is empty/absent. |
int |
hashCode()
Returns a hash code value for the object; derived from the longHash. |
static ExhibitPropsGlobalImmutable |
loadFromDataDir(java.io.File exhibitDataDir)
Load global data from filesystem. |
protected java.lang.Object |
readResolve()
Deserialise: use constructor for validation, defensive copying, conversion from old formats, etc. |
java.lang.String |
toString()
Human-readable summary of state. |
void |
validateObject()
Validate fields/state. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final long locationDBTimestamp
private final PropertiesDiff locationDB
May be absent if there was no location data available at AEP creation or when deserialising an older AEP that has no location data, or as a more efficient way to represent an empty value (we always store an empty value as null for efficiency).
public final long treedescTimestamp
private final PropertiesBundleDiff treedesc
May be absent if there was no location data available at AEP creation or when deserialising an older AEP that has no location data, or as a more efficient way to represent an empty value (we always store an empty value as null for efficiency).
private transient volatile LocationMap locMap
Derived from the locationDB info, empty if no locationDB.
Not part of the serialised state.
Marked volatile for lock-free thread-safe access.
public final long longHash
Will be zero if this contains no data.
private static final long serialVersionUID
| Constructor Detail |
|---|
public ExhibitPropsGlobalImmutable()
public ExhibitPropsGlobalImmutable(java.util.Properties locationDB,
long locationDBTimestamp,
java.util.Map<java.lang.String,java.util.Properties> treedesc,
long treedescTimestamp)
public ExhibitPropsGlobalImmutable(PropertiesDiff locationDB,
long locationDBTimestamp,
PropertiesBundleDiff treedesc,
long treedescTimestamp)
| Method Detail |
|---|
public static ExhibitPropsGlobalImmutable loadFromDataDir(java.io.File exhibitDataDir)
throws java.io.IOException
java.io.IOExceptionpublic final int getTreedescHash()
public LocationMap getLocationMap()
public java.lang.CharSequence getLocalisedTreeDescMessage(java.lang.String msgName,
java.util.Locale locale)
The key is converted to lower-case (if necessary) before lookup.
If the name is null, the result is null.
locale - desired locale, or nullpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.public java.lang.String toString()
toString in class java.lang.Object
public void validateObject()
throws java.io.InvalidObjectException
Barf if something bad is found. (Maybe allow some extra info in debug version.)
java.io.InvalidObjectException
protected java.lang.Object readResolve()
throws java.io.ObjectStreamException
java.io.ObjectStreamException
|
DHD Multimedia Gallery V1.57.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||