Serialized Form


Package org.hd.d.pg2k.clApp.atHome

Class org.hd.d.pg2k.clApp.atHome.AHJWSMain extends javax.swing.JFrame implements Serializable

serialVersionUID: -8895213711913005041L

Serialized Fields

logger

SimpleLoggerIF logger
Central logger instance for uploader; never null. This instance may log to the status bar and elsewhere.


logic

AHStandaloneMain logic
Our companion "business-logic" class; never null.


aboutAction

AboutAction aboutAction
The action performed by the "About" menu entry.


exitAction

ExitAction exitAction
The action performed by the "Exit" menu entry.


status

javax.swing.JLabel status
Status bar; never null.


sisListener

AHJWSMain.SISListener sisListener
Single listener instance.


mouseHandler

AHJWSMain.MouseHandler mouseHandler
Handles Mouse over messages on toolbar buttons and menu items; never null.


pollAL

java.awt.event.ActionListener pollAL
ActionListener invoked by pollUI; never null.


Package org.hd.d.pg2k.clApp.uploader

Class org.hd.d.pg2k.clApp.uploader.UploaderMain extends javax.swing.JFrame implements Serializable

serialVersionUID: -8885213711913005041L

Serialized Fields

logger

SimpleLoggerIF logger
Central logger instance for uploader; never null. This instance may log to the status bar and elsewhere.


logic

UploaderLogic logic
Our companion "business-logic" class; never null.


selectAction

SelectAction selectAction
The action performed by the "Select" button.


aboutAction

AboutAction aboutAction
The action performed by the "About" menu entry.


exitAction

ExitAction exitAction
The action performed by the "Exit" menu entry.


lbb

LocaleBeanBase lbb
Select our locale; never null.


status

javax.swing.JLabel status
Status bar; never null.


sisListener

UploaderMain.SISListener sisListener
Single listener instance.


uib

UploadInfoBean uib
Bean to hold our current view of the exhibit we are naming; never null.


autoSuffixCheckBox

javax.swing.JCheckBox autoSuffixCheckBox
Contains user-selected auto/manual file-type extraction; never null.


mouseHandler

UploaderMain.MouseHandler mouseHandler
Handles Mouse over messages on toolbar buttons and menu items; never null.


uploadTableEditRow

java.util.concurrent.atomic.AtomicInteger uploadTableEditRow
Row marked for editing in uploadTable; -1 if none; never null. Should be ignored if out of range for the current table content.

We use AtomicInteger for lockless thread-safety.


uploadTableModel

javax.swing.table.AbstractTableModel uploadTableModel
The table model instance for the files selected for upload; never null. This doesn't hold any data itself, simply interfaces to the data in logic.selectedFiles.

Call fireTableDataChanged() or something more fine-grained when the data has changed to allow proper redrawing.


queueTableModel

javax.swing.table.AbstractTableModel queueTableModel
The table model for the files queued for upload; never null. This doesn't hold any data itself, simply interfaces to the data in logic.uploadingFiles.

Call fireTableDataChanged() or something more fine-grained when the data has changed to allow proper redrawing.


pollAL

java.awt.event.ActionListener pollAL
ActionListener invoked by pollUI; never null.


Package org.hd.d.pg2k.svrCore

Class org.hd.d.pg2k.svrCore.AccessionData extends java.lang.Object implements Serializable

serialVersionUID: -2699150966581906068L

Serialization Methods

readResolve

protected java.lang.Object readResolve()
Deserialise: use constructor for validation, defensive copying, etc.

Serialized Fields

date

java.lang.Long date
Nominal time/data at which exhibit was added to the Gallery; null or strictly positive. This is null if not available, ie the accession time/date was not recorded, else it is the strictly positive Java time in milliseconds (since 19700101 00:00 UTC).

This can the same as, or later than, the exhibit's timestamp. If earlier than the exhibit's timestamp it may mean that the exhibit has been altered in some way.


size

java.lang.Long size
Size of exhibit file at time of accession; null or strictly positive. This is null if not available, ie the accession time/date was not recorded, else it is the strictly positive number of bytes in the file.

This should be identical to the current exhibit length else it may mean that the exhibit has been altered in some way.


hashCRC32

java.lang.Integer hashCRC32
Accession-time CRC32 whole-exhibit hash or null if not available. We use CRC32 since it is commonly used elsewhere as a file checksum, for example in ZIP files.


hashMD5

ROByteArray hashMD5
Accession-time MD5 whole-exhibit hash or null if not available. If non-null the array is always exactly 16 bytes long.

We use MD5 since it is commonly used elsewhere as a file checksum, and will in practice detect any conceivable corruption in exhibits especially given that we separately record the length.

Class org.hd.d.pg2k.svrCore.AllExhibitImmutableData extends java.lang.Object implements Serializable

serialVersionUID: 1227490240470952655L

Serialization Methods

readObject

private void readObject(java.io.ObjectInputStream ois)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Deserialise.

Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeObject

private void writeObject(java.io.ObjectOutputStream oos)
                  throws java.io.IOException
Write out a less-redundant (and more compressible) form of our internal information. We used to write this out in reverse sorted order; now we write in in forward sorted order and the ESA itself should be holding the name in a shared-prefix form.

Throws:
java.io.IOException
Serialized Fields

timestamp

long timestamp
Timestamp of last exhibit update when this snapshot was taken. Strictly positive unless map is empty, in which case it will be zero.

This information is accessible without holding any locks.


length

int length
Exhibit count, with lock-free access; non-negative. The information in this is redundant but is small and useful for speed and an integrity check, etc.

This emulates the length field of an array while size() emulates the behaviour of collections...

This information is accessible without holding any locks.

Class org.hd.d.pg2k.svrCore.AllExhibitProperties extends java.lang.Object implements Serializable

serialVersionUID: -2563720785711714753L

Serialization Methods

readResolve

protected java.lang.Object readResolve()
Deserialise: use constructor for validation, defensive copying, renormalisation, etc.

Serialized Fields

epgi

ExhibitPropsGlobalImmutable epgi
The immutable global exhibit properties; never null. This is made available as a field for maximum performance.


aeid

AllExhibitImmutableData aeid
The immutable exhibit data; never null. This is made available as a field for maximum performance.


loadedProps

java.util.Map<K,V> loadedProps
Logically immutable map from exhibit name to loadable props (ExhibitPropsLoadable); never null. If an entry for an exhibit is null then we return ExhibitPropsLoadable.EMPTY.

The keys here are canonicalised against aeid so that we don't have duplicate String values knocking about.

Note that keys may actually be String during deserialisation of older formats.


computedProps

java.util.Map<K,V> computedProps
Map from full exhibit name to ExhibitPropsComputable properties; never null. This is a Hashtable to be completely thread-safe, even during serialisation where Hashtable.writeObject() is synchronized.

An instance of ExhibitPropsComputable is created on first demand and posted to the map. No lock is held while the computation is done, so redundant computations are possible, but a high degree of concurrency is available in return.

Entries are never removed from this map, and null is never posted as a value.

Defensively copied during deserialisation.

Note that keys may actually be String during deserialisation of older formats.


longHash

long longHash
The hash of all the data held; guaranteed non-negative. Depends on the timestamp of all the exhibit (aeid) and other loadable information held (eg map data).

Is guaranteed to be zero if the exhibit set is empty, and strictly positive otherwise.

Computable data (and hashNotChangedSince) is excluded from the hash since it is derived from other data that is included in the hash.


constructedAt

long constructedAt
The time that this object was constructed. Strictly positive unless there are no exhibits, in which case this is zero.

We keep this private.


hashNotChangedSince

long hashNotChangedSince
Time since which we claim that the exhibit set/data has not changed; guaranteed non-negative. If a new AllExhibitProperties object is constructed with the aid of an old one, and the longHash has not changed between the two, then this is copied from the old object (except that as a belt and braces measure it is ensured to be no older than the aeid.timestamp), else it is the same as the constructedAt time.

If a new AllExhibitProperties object is constructed from scratch each time then this will be the time that the object was constructed, and so we can regard this as a an `exhibits have not changed since' time.

Strictly positive unless there are no exhibits, in which case this is zero (to prompt early recomputation!).

Class org.hd.d.pg2k.svrCore.AllExhibitPropertiesDelta extends java.lang.Object implements Serializable

serialVersionUID: 8608225153676490831L

Serialization Methods

readObject

private void readObject(java.io.ObjectInputStream ois)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Deserialise.

Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeObject

private void writeObject(java.io.ObjectOutputStream oos)
                  throws java.io.IOException
Write out a less-redundant form of our internal information. In particular, since deltas will not usually involve deletion of any exhibits, we make the no-deletions case take no space at all in the serialised form.

Throws:
java.io.IOException
Serialized Fields

longHashAEPBefore

long longHashAEPBefore
The long hash for the AEP to which the diff is to be applied; guaranteed non-negative.


longHashAEPAfter

long longHashAEPAfter
The long hash for the AEP result; guaranteed non-negative.


hashNotChangedSinceAfter

long hashNotChangedSinceAfter
The timestamp from the AEP result; guaranteed non-negative.


timestampAEIDBefore

long timestampAEIDBefore
The timestamp/hash for the AEIP in the AEP to which the diff is to be applied; guaranteed non-negative.


timestampAEIDAfter

long timestampAEIDAfter
The timestamp/hash for the AEIP in the AEP result; guaranteed non-negative.


lengthAEIDBefore

int lengthAEIDBefore
The exhibit count for the AEIP in the AEP to which the diff is to be applied; guaranteed non-negative.


lengthAEIDAfter

int lengthAEIDAfter
The exhibit count for the AEIP in the AEP result; guaranteed non-negative.


epgiDiff

EPGIDiff epgiDiff
The diff from the previous EPGI; may be null to represent no changes to EPGI value.

Class org.hd.d.pg2k.svrCore.AllExhibitPropertiesDelta.DiffException extends java.lang.Exception implements Serializable

serialVersionUID: -330320938545639614L

Class org.hd.d.pg2k.svrCore.Compact7BitString extends java.lang.Object implements Serializable

serialVersionUID: -5836076660507008468L

Serialization Methods

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Deserialise.

Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeObject

private void writeObject(java.io.ObjectOutputStream oos)
                  throws java.io.IOException
Write out a minimally-redundant form of our internal information. The more-efficient on-the-wire format also makes defensive reading easier.

We don't write *any* default state.

We must never be asked to serialise if we have a (non-null) dictionary.

We must never be asked to serialise if the text is too long for us to encode.

Throws:
java.io.IOException

readResolve

private java.lang.Object readResolve()
Deserialise: use constructor for validation, defensive copying, etc.


writeReplace

protected java.lang.Object writeReplace()
                                 throws java.io.ObjectStreamException
Returns the best format to write the contained text to the wire. We write ourself to the wire as a java.lang.String or CS8Bit if it appears that that would be more efficient and/or safer.

We almost always write ourself out as a CS8Bit assuming that a good general-purpose compressor such as ZIP will do better than our memory-efficient form given the original text, but if we manage to find a lot of compressibility then we'll save ourself directly.

If a static dictionary is in use then we force serialisation as a CS8Bit for safety (to avoid ambiguity).

Throws:
java.io.ObjectStreamException

Class org.hd.d.pg2k.svrCore.CS8Bit extends java.lang.Object implements Serializable

serialVersionUID: -475170579269562789L

Serialization Methods

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Deserialise.

Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeObject

private void writeObject(java.io.ObjectOutputStream oos)
                  throws java.io.IOException
Write out a minimally-redundant form of our internal information. The more-efficient on-the-wire format also makes defensive reading easier.

We don't write *any* default state.

We must never be asked to serialise if we have a (non-null) dictionary.

We must never be asked to serialise if the text is too long for us to encode.

Throws:
java.io.IOException

readResolve

protected java.lang.Object readResolve()
Deserialise: resolve all empty instances to a single value as a minor optimisation.

Does not automatically intern() on deserialisation to avoid possibly-unwanted overheads for small/singleton values.

Class org.hd.d.pg2k.svrCore.EPGIDiff extends java.lang.Object implements Serializable

serialVersionUID: -3566302089418451668L

Serialization Methods

readResolve

protected java.lang.Object readResolve()
                                throws java.io.ObjectStreamException
Deserialise: use constructor for validation, defensive copying, conversion from old formats, etc. Also allows us to (re)normalise the data in this instance.

Throws:
java.io.ObjectStreamException
Serialized Fields

locationDBTimestampNew

long locationDBTimestampNew
The new location DB timestamp; strictly positive, or zero for empty diff.


locationDBDiff

PropertiesDiff locationDBDiff
The diffed location DB in properties format; non-empty else null.


treedescTimestampNew

long treedescTimestampNew
The new treedesc timestamp; strictly positive, or zero for empty diff.


treedescDiff

PropertiesBundleDiff treedescDiff
The diffed treedesc in properties format; non-empty else null.

Class org.hd.d.pg2k.svrCore.ExhibitAttrUtils.ExhibitAttrWords extends java.lang.Object implements Serializable

serialVersionUID: -1067125631686499751L

Serialization Methods

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Deserialise.

Throws:
java.io.IOException
java.lang.ClassNotFoundException
Serialized Fields

longHash

long longHash
The hash of all the data held; guaranteed non-negative. Depends all the information held in this object.


attrWords

java.lang.String[] attrWords
The sorted and duplicate-free list of attribute words. All of these should meet the rules for ExhibitNames.validAttributeWord().

We are careful never to share a reference to this outside the class, eg upon deserialisation.

This is the primary store of attribute words information.


SUBJECT_ORDER

java.util.Comparator<T> SUBJECT_ORDER
A Comparator that sorts exhibits by name comparing as equal those that differ only in attribute words. This sorts, in order by:
  1. main stem of the name case-insensitively
  2. author
  3. number-in-series


SMART_ORDER

java.util.Comparator<T> SMART_ORDER
A Comparator that sorts exhibits by name taking account of attribute words. This sorts, in order by:
  1. SUBJECT_ORDER to sort into order by exhibit subject
  2. attribute words to sort within an exhibit subject
  3. ExhibitName.SIMPLE_SMART_ORDER to break ties

equals() is true iff referring underlying comparator's backing AEP has an unchanged longHash.

Class org.hd.d.pg2k.svrCore.ExhibitPropsComputable extends java.lang.Object implements Serializable

serialVersionUID: -8518817446313821597L

Serialization Methods

readResolve

protected java.lang.Object readResolve()
Deserialise: use constructor for validation, defensive copying, etc. Also resolve all empty instances to a singleton as a minor optimisation, and immediately intern() new values so as to immediately discard duplicates (eg of exhibits already known) ASAP to minimise heap churn.


writeReplace

protected java.lang.Object writeReplace()
Serialise: write in the best format for the wire. To get best aggregate compressed size on the wire, eg where the compressed stream contains many similar non-identical instances, we always write out the metadata in its Name (or String) format (minus the outer tags) regardless of how it is actually held in memory. This also makes us immune to changes in the the internals of the other formats and allows use of a static dictionary with Compact7BitString for better in-memory compression (ie effectively cross-instance compression).

This allows a stream compressor to effectively remove the redundancy between instances of this class on the wire as well as internal redundancies.

We assume that there will almost never be identical instances on one stream so we don't mind writing new copies each time where it does happen.

Serialized Fields

xyDimensions

java.awt.Dimension xyDimensions
X,Y dimensions in pixels for images (moving or still) that have a fixed rectangular dimension, else null. If this is non-null then x and y are strictly positive.

Because Dimension is mutable, we hand out copies of it to callers.


metadata

java.lang.Object metadata
Trimmed metadata for the exhibit (without the constant prefix/suffix); null if none available. This may exist in a number of formats for efficiency "on the wire" and to save space in memory.

Note that this is stored without the redundant top-level tag.

Marked volatile to allow safe lockless update by compact().

Class org.hd.d.pg2k.svrCore.ExhibitPropsComputableMutable extends java.lang.Object implements Serializable

serialVersionUID: 8518817446315221597L

Serialization Methods

readResolve

protected java.lang.Object readResolve()
Deserialise: use constructor for validation, defensive copying, etc. Replace all trivially-stale "empty" values with a single shared value.

NOTE: this may not always preserve all values as expected in future.


writeReplace

protected java.lang.Object writeReplace()
Serialise: replace all trivially-stale values being serialised with TRIVIAL_NEUTRAL. We save all other (non-trivially-stale) values as-is, even if stale, because they may have taken significant resources to compute and may still be much more accurate than any fast approximation we could compute.

NOTE: this is effectively a LOSSY compression mechanism.

Serialized Fields

staleAfter

long staleAfter
Time until which this data is considered valid; beyond this time is stale. If zero, or before the current time of day, the data is stale.

If the stale date is too far in the future for us to believe, ie much more than would be allowed with this version of the object, then we treat the data as stale in case it is from a version of this object with very different staleness limits or there was a persistence error.


goodness

int goodness
The "goodness" score, -MAX_VALUE is maximally bad and MAX_VALUE maximally good, zero is neutral. This is a composite of many factors, including a small random element.

Has enough significant digits to allow a total ordering even over a very large number of exhibits.

This is nominally logically thought of in the range [-1.0, +1.0].

Class org.hd.d.pg2k.svrCore.ExhibitPropsGlobalImmutable extends java.lang.Object implements Serializable

serialVersionUID: -1067125631686499752L

Serialization Methods

readResolve

protected java.lang.Object readResolve()
                                throws java.io.ObjectStreamException
Deserialise: use constructor for validation, defensive copying, conversion from old formats, etc. Also allows us to (re)normalise the data in this instance, eg to recompute the longHash in case our hash algorithm changes.

Throws:
java.io.ObjectStreamException
Serialized Fields

locationDBTimestamp

long locationDBTimestamp
The location DB timestamp; strictly positive, or zero if no/empty locationDB.


locationDB

PropertiesDiff locationDB
The (immutable) location DB in properties format; null if absent. We store this in PropertiesDiff format for efficiency on the wire, but convert it to LocationMap before use.

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).


treedescTimestamp

long treedescTimestamp
The treedesc bundle timestamp; non-negative, or may be zero if locationDBis empty/absent.


treedesc

PropertiesBundleDiff treedesc
The (immutable) treedesc bundle; null if absent. We store this in PropertiesBundleDiff format for efficiency on the wire.

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).


longHash

long longHash
The hash of all the data held; guaranteed non-negative. Depends all the information held in this object.

Will be zero if this contains no data.

Class org.hd.d.pg2k.svrCore.ExhibitPropsLoadable extends java.lang.Object implements Serializable

serialVersionUID: 8659120481539311156L

Serialization Methods

readResolve

protected java.lang.Object readResolve()
Deserialise: use constructor for validation, defensive copying, etc. Also resolve all empty instances to a singleton as a minor optimisation, and immediately intern() select parts so as to immediately discard duplicates (eg of exhibits already known) ASAP to minimise heap churn.


writeReplace

protected java.lang.Object writeReplace()
Serialise: write in the best format for the wire. To get best aggregate compressed size on the wire, eg where the compressed stream contains many similar non-identical instances, we always write out (non-null) description in Name format regardless of how it is actually held in memory. This also makes us immune to changes in the the internals of the other formats and allows use of a static dictionary with Compact7BitString for better in-memory compression (ie effectively cross-instance compression).

This helps a stream compressor remove the redundancy between instances of this class on the wire as well as internal redundancies.

We assume that there will almost never be entirely identical instances on one stream so we don't mind writing new copies each time where it does happen.

Serialized Fields

description

java.lang.Object description
The description. This can be:
  • null, meaning no description,
  • a non-empty String for the literal description
  • a non-empty byte[] containing a maximally deflated copy of the string without zlib or gzip headers and trailers
  • a ROByteArray created with compressFromString()
  • a Name (the preferred on-the-wire form)
  • a Compact7BitString (the preferred in-memory form).
  • Support for the byte[] and ROByteArray formats exists mainly for backwards compatibility, ie deserialising old values. All bytes in the source string are of value 0--127 (ie ASCII 7-bit).

    Marked volatile to allow safe lockless update by compact().


    location

    Location.Base location
    Location information; null if none. Information here must always be marked "specific".


    accession

    AccessionData accession
    Accession data; null if none.

    Class org.hd.d.pg2k.svrCore.ExhibitStaticAttr extends java.lang.Object implements Serializable

    serialVersionUID: -8233812711746526095L

    Serialization Methods

    readObject

    private void readObject(java.io.ObjectInputStream in)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
    Deserialise. Yucky use of reflection to set final field values: see http://jeremymanson.blogspot.com/2008/07/immutability-in-java-part-3.html

    Throws:
    java.io.IOException
    java.lang.ClassNotFoundException
    Serialized Fields

    filePath

    Name.ExhibitFull filePath
    The full (relative) path/name of the exhibit; never null. Must be unique and acceptable to ExhibitName.

    All run-time instances will have the same type, except possibly fleetingly during (de)serialisation.

    The field type was CharSequence to allow reading in of old String-valued instances but is now converted at deserialistion time to Name.ExhibitFull if not already so.


    length

    long length
    The length of the exhibit in bytes; strictly positive.


    timestamp

    long timestamp
    The Java-style timestamp (last-modified-time) of the exhibit (ms); strictly positive. This must be valid Gallery timestamp which means not before the Gallery was created and not too far into the future allowing for clock skew...

    Class org.hd.d.pg2k.svrCore.ExhibitThumbnails extends java.lang.Object implements Serializable

    serialVersionUID: 2686345754458313314L

    Serialization Methods

    readObject

    private void readObject(java.io.ObjectInputStream in)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
    Deserialise.

    Throws:
    java.io.IOException
    java.lang.ClassNotFoundException

    readResolve

    protected java.lang.Object readResolve()
    Eliminate duplicate empty objects after deserialisation.

    Serialized Fields

    sml

    ExhibitThumbnails.Thumbnail sml
    Small thumbnail; null means none can be constructed.


    std

    ExhibitThumbnails.Thumbnail std
    Standard thumbnail; null means none can be constructed.


    created

    long created
    Creation timestamp (positive), or zero if none.

    Class org.hd.d.pg2k.svrCore.ExhibitThumbnails.Thumbnail extends java.lang.Object implements Serializable

    serialVersionUID: -1279061480258712366L

    Serialization Methods

    readObject

    private void readObject(java.io.ObjectInputStream in)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
    Deserialise.

    Throws:
    java.io.IOException
    java.lang.ClassNotFoundException
    Serialization Overview
    Mark all mutable members as unshared for safety.

    Serialized Fields

    Class org.hd.d.pg2k.svrCore.LocaleBeanBase extends java.lang.Object implements Serializable

    serialVersionUID: -6180248508840300658L

    Serialization Methods

    readObject

    private void readObject(java.io.ObjectInputStream in)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
    Deserialise.

    Throws:
    java.io.IOException
    java.lang.ClassNotFoundException
    Serialized Fields

    userLocale

    java.util.Locale userLocale
    Locale retrieved by setRequest, or a safe locale value; never null. Volatile to allow thread-safe access without a lock.

    Class org.hd.d.pg2k.svrCore.Name extends java.lang.Object implements Serializable

    serialVersionUID: 2798109831174584816L

    Serialization Methods

    readObject

    private void readObject(java.io.ObjectInputStream in)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
    Deserialise. Expects validation to happen in readResolve().

    Throws:
    java.io.IOException
    java.lang.ClassNotFoundException

    writeObject

    private void writeObject(java.io.ObjectOutputStream oos)
                      throws java.io.IOException
    Write out a minimally-redundant form of our internal information. The more-efficient on-the-wire format also makes defensive reading easier.

    Throws:
    java.io.IOException

    readResolve

    protected java.lang.Object readResolve()
                                    throws java.io.ObjectStreamException
    Deserialise: validate this instance, coerce mildly-errant values, and eliminate duplicates. Has to handle derived classes too.

    Throws:
    java.io.ObjectStreamException
    Serialized Fields

    prev

    Name prev
    Non-empty item with which we share a prefix and/or suffix, or null if entire value is empty (equivalent to "") or if there is no shared part(s). May be non-empty if this new value is a prefix/suffix of the prev value.

    Is protected since potentially to derived instances.


    terminiLengths

    short terminiLengths
    Termini lengths (unsigned) packed into a single value for efficiency. The prefix bits are the low-order bits.

    This is part of the compact serialised state.

    Class org.hd.d.pg2k.svrCore.Name.ExhibitFull extends Name implements Serializable

    serialVersionUID: 8993934283490189577L

    Class org.hd.d.pg2k.svrCore.PGBeanException extends java.lang.Exception implements Serializable

    serialVersionUID: 2313414189035018929L

    Class org.hd.d.pg2k.svrCore.PGException extends java.io.IOException implements Serializable

    serialVersionUID: 3617032881609799000L

    Class org.hd.d.pg2k.svrCore.PGMasterNotInServiceException extends java.io.IOException implements Serializable

    serialVersionUID: -4026683164624478589L

    Class org.hd.d.pg2k.svrCore.ROByteArray extends java.lang.Object implements Serializable

    serialVersionUID: 3806652319473305560L

    Serialization Methods

    readResolve

    protected java.lang.Object readResolve()
    Deserialise: use constructor for validation, defensive copying, etc. Also resolve all empty instances to a single value as a minor optimisation.

    Serialized Fields

    payload

    byte[] payload
    The (non-null) payload reference.

    Class org.hd.d.pg2k.svrCore.ROIntArray extends java.lang.Object implements Serializable

    serialVersionUID: 4100310899376658916L

    Serialization Methods

    readResolve

    protected java.lang.Object readResolve()
    Deserialise: use constructor for validation, defensive copying, etc. Also resolve all empty instances to a single value as a minor optimisation.

    Serialized Fields

    payload

    int[] payload
    The (non-null) payload reference.

    Class org.hd.d.pg2k.svrCore.Stratum extends java.lang.Object implements Serializable

    serialVersionUID: 654463415117548565L

    Serialization Methods

    readResolve

    protected java.lang.Object readResolve()
    Deserialise: use constructor for validation, defensive copying, etc.

    Serialized Fields

    stratum

    byte stratum
    Our stratum, in range [0,MAX_STRATUM] with 0 indicating master/root, or -1 for unknown.


    rootDelay

    short rootDelay
    Root delay in ms capped to Short.MAX_VALUE; non-negative. Is forced to the MAX_ROOT_DELAY for an unknown stratum.


    upstreamName

    java.lang.String upstreamName
    Upstream server short, unique, printable-ASCII name, "" for root/master/unknown else mirror tag like "cc-xxx"; never null.


    upstreamConserving

    boolean upstreamConserving
    True if upstream is in a power-conserving state or unknown (as fail-safe).

    Class org.hd.d.pg2k.svrCore.Tuple.ComparablePair extends java.lang.Object implements Serializable

    serialVersionUID: -5550500104003361225L

    Serialized Fields

    first

    java.lang.Comparable<T> first
    The first member of the pair.


    second

    java.lang.Comparable<T> second
    The second member of the pair.

    Class org.hd.d.pg2k.svrCore.Tuple.ComparableTriple extends java.lang.Object implements Serializable

    serialVersionUID: -4570980722385392467L

    Serialized Fields

    first

    java.lang.Comparable<T> first
    The first member of the triple.


    second

    java.lang.Comparable<T> second
    The second member of the triple.


    third

    java.lang.Comparable<T> third
    The third member of the triple.

    Class org.hd.d.pg2k.svrCore.Tuple.Pair extends java.lang.Object implements Serializable

    serialVersionUID: -5550500104003361224L

    Serialized Fields

    first

    java.lang.Object first
    The first member of the pair.


    second

    java.lang.Object second
    The second member of the pair.

    Class org.hd.d.pg2k.svrCore.Tuple.Triple extends java.lang.Object implements Serializable

    serialVersionUID: -4570980722385392466L

    Serialized Fields

    first

    java.lang.Object first
    The first member of the triple.


    second

    java.lang.Object second
    The second member of the triple.


    third

    java.lang.Object third
    The third member of the triple.


    Package org.hd.d.pg2k.svrCore.datasource

    Class org.hd.d.pg2k.svrCore.datasource.ExhibitDataTunnelSource.TunnelBusyIOException extends java.io.InterruptedIOException implements Serializable

    serialVersionUID: 5573883733879369445L


    Package org.hd.d.pg2k.svrCore.datasource.simpleCache

    Class org.hd.d.pg2k.svrCore.datasource.simpleCache.MetaData extends java.lang.Object implements Serializable

    serialVersionUID: -7596195262594968694L

    Serialization Methods

    readObject

    private void readObject(java.io.ObjectInputStream in)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
    Deserialise.

    Throws:
    java.io.IOException
    java.lang.ClassNotFoundException

    writeObject

    private void writeObject(java.io.ObjectOutputStream oos)
                      throws java.io.IOException
    Write out a less-redundant form of our internal information. Prevent (lazy-evaluation-caused) state changes while serialising by being synchronized.

    The more-efficient on-the-wire format also makes defensive reading easier.

    Throws:
    java.io.IOException

    Package org.hd.d.pg2k.svrCore.location

    Class org.hd.d.pg2k.svrCore.location.Location.Base extends java.lang.Object implements Serializable

    serialVersionUID: -7784138110080680826L

    Serialized Fields

    type

    java.lang.String type
    The type of this location info.


    specific

    boolean specific
    Did this item have its own specific location info?

    Class org.hd.d.pg2k.svrCore.location.Location.DoubleValueAndBounds extends Location.ValueAndBounds implements Serializable

    serialVersionUID: -666396322028089442L

    Class org.hd.d.pg2k.svrCore.location.Location.Estd extends Location.Time implements Serializable

    serialVersionUID: 3108417206234772844L

    Serialized Fields

    E

    Location.DoubleValueAndBounds E
    How many degrees East are we?


    N

    Location.DoubleValueAndBounds N
    How many degrees North are we?


    Alt

    Location.DoubleValueAndBounds Alt
    How many metres above mean sea level are we?

    Class org.hd.d.pg2k.svrCore.location.Location.LongValueAndBounds extends Location.ValueAndBounds implements Serializable

    serialVersionUID: 4934329592740791248L

    Class org.hd.d.pg2k.svrCore.location.Location.Time extends Location.Base implements Serializable

    serialVersionUID: 3902949361757128661L

    Serialized Fields

    Time

    Location.LongValueAndBounds Time
    What time does the item record?

    Class org.hd.d.pg2k.svrCore.location.Location.ValueAndBounds extends java.lang.Object implements Serializable

    serialVersionUID: 1802455018686196426L

    Serialized Fields

    value

    java.lang.Number value
    Central value; never null.


    error

    java.lang.Number error
    Error bounds; never null.

    Class org.hd.d.pg2k.svrCore.location.LocationMap extends java.lang.Object implements Serializable

    serialVersionUID: -8356330012477285265L

    Serialized Fields

    timestamp

    long timestamp
    Timestamp passed in constructor; never negative. Guaranteed zero if the map is empty.


    mapFromNamePrefixToLocation

    java.util.Map<K,V> mapFromNamePrefixToLocation
    Immutable Map from Name prefix to Location.Base; never null. Map from "virtual" exhibit name (prefix) to Location object so that we can reuse previously generated objects. The exhibit name key consists of the top-level section/directory and some leading portion of the name; no intermediate directories are stored.

    A HashMap is preferred for speed.


    revLookupSection

    Name revLookupSection
    Reverse section used for reverse matches, or null if none.


    revLookupMinWords

    int revLookupMinWords
    Minimum number of words matched for reverse matches, or non-positive if none.


    Package org.hd.d.pg2k.svrCore.props

    Class org.hd.d.pg2k.svrCore.props.GenProps extends java.lang.Object implements Serializable

    serialVersionUID: 8715644348905699663L

    Serialization Methods

    readObject

    private void readObject(java.io.ObjectInputStream in)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
    Deserialise.

    Throws:
    java.io.IOException
    java.lang.ClassNotFoundException
    Serialized Fields

    timestamp

    long timestamp
    Timestamp of this properties set; zero for default/empty set.


    gen

    java.util.Map<K,V> gen
    The (immutable) generic properties map; never null.


    WEBSVR_MIN_EX_IMATTR_RECHECK_MS

    int WEBSVR_MIN_EX_IMATTR_RECHECK_MS
    Web server minimum exhibit-immutable-attributes check interval (ms).


    WEBSVR_SYSPROPS_RECHECK_MS

    int WEBSVR_SYSPROPS_RECHECK_MS
    Web server sysprops (ie most property files including GenProps) (re)check interval (ms).


    WEBSVR_MAX_CACHEABLE_EX_BYTES

    int WEBSVR_MAX_CACHEABLE_EX_BYTES
    Web server maximum-cached-exhibit-prefix-size (bytes).


    WEBSVR_TN_CACHEPC

    int WEBSVR_TN_CACHEPC
    Web server persistent thumbnail cache size limit as percentage of exhibit cache limit value.


    WEBSVR_BW_LIMITER

    int WEBSVR_BW_LIMITER
    Web server precacheing bandwidth-limiter value (max fraction of available bandwidth used on precacheing).


    WEBSVR_MAX_EX_BYTES

    int WEBSVR_MAX_EX_BYTES
    Web server maximum exhibit size (32-bit value, bytes).


    WEBSVR_META_KEYWORDS

    java.lang.String WEBSVR_META_KEYWORDS
    Keywords list for HTML meta header ("" if none; not null).


    WEBSVR_META_DESCRIPTION

    java.lang.String WEBSVR_META_DESCRIPTION
    Description for HTML meta header ("" if none; not null).


    WEBSVR_BG_IMAGE

    java.lang.CharSequence WEBSVR_BG_IMAGE
    JPEG exhibit to use as a background image (null if none). Should be Name.ExhibitFull but could be String from deserialising old format.


    WEBSVR_SIMPLEAD_ALLOW

    boolean WEBSVR_SIMPLEAD_ALLOW
    On/off switch for simple banner ad code, enabled by default.


    totalSimpleAdWeight

    int totalSimpleAdWeight
    Total weight of all simple ads; non-negative. Strictly positive if there are some simple ads.


    simpleAds

    GenProps.SimpleAd[] simpleAds
    Sorted array of simple ads, no empty slots, non-zero length; or null if no simple ads.


    classifiedAds

    GenProps.ClassifiedAd[] classifiedAds
    Array of classified ads, no empty slots or duplicates, non-zero length; or null if no classified ads.


    authDB

    java.util.SortedMap<K,V> authDB
    Immutable SortedMap of author details, no empty or duplicate slots; non-zero length, or null if none.


    popWeights

    java.util.Map<K,V> popWeights
    Map from String token to Byte ([-100,+100]) weighting. We cheat and assume the that sets of author, attribute words and extensions are disjoint, and so we keep all the mappings in a single table!


    WEBSVR_EX_HOTLINK_LIMITER

    byte WEBSVR_EX_HOTLINK_LIMITER
    Web server hotlinked-download-limiter value (as percentange of all exhibit downloads).


    WEBSVR_EX_HOTLINK_DIVERT_URL

    java.lang.String WEBSVR_EX_HOTLINK_DIVERT_URL
    Web server hotlinked-download-limiter divert graphic URL value.


    hotLinkAllowHosts

    java.util.Set<E> hotLinkAllowHosts
    Immutable Set of "allow" hotlink hosts (normalised host names); can be null for no such hosts.


    hotLinkAllowHostsRegex

    java.util.regex.Pattern hotLinkAllowHostsRegex
    Immutable compiled case-insensitive regex pattern for hotlink allow hosts not in literal list; can be null if no such "regex-match" hosts.


    hotLinkDisallowHosts

    java.util.Set<E> hotLinkDisallowHosts
    Immutable Set of "disallow" hotlink hosts (normalised/stripped/lower-cased host names); can be null for no such hosts.


    hotLinkDisallowHostsRegex

    java.util.regex.Pattern hotLinkDisallowHostsRegex
    Immutable compiled case-insensitive regex pattern for hotlink disallow hosts not in literal list; can be null if no such "regex-match" hosts.


    DNSBLs

    java.util.Set<E> DNSBLs
    Immutable Set of DNS BLs (normalised DNS zone names); can be null for no such hosts.

    Class org.hd.d.pg2k.svrCore.props.GenProps.AuthData extends java.lang.Object implements Serializable

    serialVersionUID: 2647433856891011944L

    Serialization Methods

    readObject

    private void readObject(java.io.ObjectInputStream in)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
    Deserialise.

    Throws:
    java.io.IOException
    java.lang.ClassNotFoundException
    Serialized Fields

    auth

    java.lang.String auth
    Author initials: must be syntactically valid; non-null.


    name

    java.lang.String name
    Author name: must be pure 7-bit printable ASCII HTML with possible entities; not empty, non-null.


    www

    java.lang.String www
    Author home-page URL: should be syntactically valid URL or null.


    email

    java.lang.String email
    Author email: should be syntactically valid email address or null.


    desc

    java.lang.String desc
    Description HTML code as 7-bit ASCII; never empty but can be null.

    Class org.hd.d.pg2k.svrCore.props.GenProps.ClassifiedAd extends java.lang.Object implements Serializable

    serialVersionUID: 8848447664623542985L

    Serialization Methods

    readResolve

    protected java.lang.Object readResolve()
    Deserialise: validate and eliminate duplicates coming off the wire.

    Serialized Fields

    regex

    java.lang.String regex
    Valid case-sensitive regular expression to match a substring of a URI path, never null nor empty.


    code

    java.lang.String code
    HTML code as 7-bit ASCII; non-null, non-zero length.


    start

    long start
    Start time (+ve UTC ms) or zero if no start time.


    end

    long end
    Start time (+ve UTC ms greater than 'start') or zero if no end time.


    lang

    java.lang.String lang
    Language/locale filter; two-letter lower-case language code or null if none.


    countries

    java.lang.String countries
    Country code; comma-separated list of lower-case ccTLD codes or null if none.

    Class org.hd.d.pg2k.svrCore.props.PropertiesBundleDiff extends java.lang.Object implements Serializable

    serialVersionUID: 4307342238100184047L

    Serialization Methods

    readObject

    private void readObject(java.io.ObjectInputStream ois)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
    Deserialise. This intern()s all the Properties set names.

    Throws:
    java.io.IOException
    java.lang.ClassNotFoundException

    writeObject

    private void writeObject(java.io.ObjectOutputStream oos)
                      throws java.io.IOException
    Write out a less-redundant form of our internal information. In particular, since deltas will not usually involve deletion of any values, we make the no-deletions case take no space at all in the serialised form.

    Throws:
    java.io.IOException

    readResolve

    protected java.lang.Object readResolve()
                                    throws java.io.ObjectStreamException
    Deserialise: discard duplicate empty values.

    Throws:
    java.io.ObjectStreamException
    Serialized Fields

    sizeBefore

    int sizeBefore
    The input bundle count as a sanity-check; guaranteed non-negative.


    sizeAfter

    int sizeAfter
    The output bundle count as a sanity-check; guaranteed non-negative.

    Class org.hd.d.pg2k.svrCore.props.PropertiesDiff extends java.lang.Object implements Serializable

    serialVersionUID: 4307342238100184046L

    Serialization Methods

    readObject

    private void readObject(java.io.ObjectInputStream ois)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
    Deserialise. This doesn't work very hard to intern() or optimise or validate state, since readResolve() will pass all the data to a constructor to deal with.

    Throws:
    java.io.IOException
    java.lang.ClassNotFoundException

    writeObject

    private void writeObject(java.io.ObjectOutputStream oos)
                      throws java.io.IOException
    Write out a less-redundant form of our internal information. In particular, since deltas will not usually involve deletion of any values, we make the no-deletions case take no space at all in the serialised form.

    None of the values written are intern()ed during serialisation, at the risk of not unifying them with identical values in the object stream, to avoid inadvertently creating permanent intern() overhead for them.

    Throws:
    java.io.IOException

    readResolve

    protected java.lang.Object readResolve()
                                    throws java.io.ObjectStreamException
    Deserialise: including discarding duplicate empty values.

    Throws:
    java.io.ObjectStreamException
    Serialized Fields

    sizeBefore

    int sizeBefore
    The entry count for the input properties set as a sanity-check; guaranteed non-negative.


    sizeAfter

    int sizeAfter
    The entry count for the output properties set as a sanity-check; guaranteed non-negative.

    Class org.hd.d.pg2k.svrCore.props.SecurityProps extends java.lang.Object implements Serializable

    serialVersionUID: -7930248582951598929L

    Serialized Fields

    timestamp

    long timestamp
    Timestamp of this properties set.


    gensec

    java.util.Properties gensec
    Internal private copy of GENSECPROPS_PREFIX properties.


    TUNNEL_CLIENT_LIST

    java.lang.String TUNNEL_CLIENT_LIST
    Web server permitted tunnel client list by IP address, space separated, never null.


    Package org.hd.d.pg2k.svrCore.uploader

    Class org.hd.d.pg2k.svrCore.uploader.ExhibitHandlerBeanBase extends java.lang.Object implements Serializable

    serialVersionUID: 8025048065146981171L

    Serialized Fields

    onlyAllowExtant

    boolean onlyAllowExtant
    If true, limit selections to existing values in the database. If false, a wider range of legal values is allowed.

    If true, file types and authors can only be selected from ones already represented in the production database.


    aep

    AllExhibitProperties aep
    The AllExhibitProperties data; never null. Must be set before other property values are set.


    suffix

    java.lang.String suffix
    Suffix selected (starting with ``.''), or "" if none (ie all types OK).


    author

    java.lang.String author
    Author (initials) selected, or "" if none.


    category

    java.lang.String category
    Category selected, or "" if none.


    attributes

    java.util.List<E> attributes
    List of attribute words (String), or empty if none; immutable. We preserve order and repetition unless the dedupAttrs() call is made.

    This item may be replaced but is not mutated in situ and is immutable and so can be safely handed out to callers.

    Class org.hd.d.pg2k.svrCore.uploader.UploadInfoBean extends ExhibitHandlerBeanBase implements Serializable

    serialVersionUID: -6989233428145950946L

    Serialized Fields

    uploadAeid

    AllExhibitImmutableData uploadAeid
    Aeid for upload area; should be set.


    number

    int number
    The number in the current series; never negative. If zero, it will not be inserted into the filename (ie is the default).


    mainWords

    java.lang.String mainWords
    Main body words; valid string of hyphen-separated words where; can be "" but never null. Trailing words may not be attribute words and the final one may not be a number.


    description

    java.lang.String description
    Description text or "" if none; never null. Pure ASCII text, possibly with HTML mark-up.


    Package org.hd.d.pg2k.svrCore.vars

    Class org.hd.d.pg2k.svrCore.vars.EventVariableValue extends java.lang.Object implements Serializable

    serialVersionUID: 5094323684152972705L

    Serialization Methods

    readObject

    private void readObject(java.io.ObjectInputStream ois)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
    Deserialise. This explicitly recovers state for fields by name.

    This does not attempt to build some of the transient state assembled by the constructor, nor do defensive copying or significant validation.

    Throws:
    java.io.IOException
    java.lang.ClassNotFoundException

    writeObject

    private void writeObject(java.io.ObjectOutputStream oos)
                      throws java.io.IOException
    Customise how we save state when serialising.

    Throws:
    java.io.IOException

    readResolve

    protected java.lang.Object readResolve()
    Deserialise: use constructor for validation, defensive copying, conversion from old formats, etc. Also allows us to intern() keys, etc, to conserve memory.

    Serialized Fields

    def

    SimpleVariableDefinition def
    The variable definition; never null.

     

    period

    EventPeriod period
    The event period; never null.

     

    intervalNumber

    long intervalNumber
    The interval number; strictly positive.


    authoratitive

    boolean authoratitive
    If true, this variable has come from the authoritative end-point. Due to an old typo now fossilised in old data, the spelling of this should remain "authoratitive" even though wrong! Thank goodness for encapsulation!

     

    totalEventCount

    int totalEventCount
    Total event count; non-negative.


    counts

    int[] counts
    Counts of the different (non-null) values in non-increasing-count order (ie best first); never null. All counts are non-negative.

    Same length as values[].

     

    values

    java.lang.Object[] values
    Values of the different (non-null) events in non-increasing-count order (ie best first); never null. All values are non-null and valid values as determined by the def though note that some values may be substituted with compact alternatives.

    Same length as counts[].

    The general case is that a value's rank is its position in this array.

     

    Class org.hd.d.pg2k.svrCore.vars.EventVariableValue.ValueInfo extends java.lang.Object implements Serializable

    serialVersionUID: 887928932975973213L

    Serialization Methods

    readResolve

    protected java.lang.Object readResolve()
    Deserialise: use constructor for validation, defensive copying, etc.

    Serialized Fields

    rank

    int rank
    Rank: 0 means top, ie highest count; non-negative.


    count

    int count
    Count is count of this value; strictly positive.

    Class org.hd.d.pg2k.svrCore.vars.EventVariableValueBuffer extends java.lang.Object implements Serializable

    serialVersionUID: -1721389511619513375L

    Serialization Methods

    readObject

    private void readObject(java.io.ObjectInputStream ois)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
    Deserialise.

    Throws:
    java.io.IOException
    java.lang.ClassNotFoundException

    writeObject

    private void writeObject(java.io.ObjectOutputStream oos)
                      throws java.io.IOException
    Customise how we save state when serialising.

    Throws:
    java.io.IOException
    Serialized Fields

    def

    SimpleVariableDefinition def
    The (immutable) variable definition; never null.


    period

    EventPeriod period
    The (immutable) event period; never null.


    intervalNumber

    long intervalNumber
    The (immutable) interval number; strictly positive.


    totalEventCount

    int totalEventCount
    Total event count; non-negative. Initially zero.

    Mutable; accessed under the instance lock.


    counts

    java.util.Map<K,V> counts
    Map from event value to count of events of that value. Initially empty.

    Not thread-safe (access should be protected by other means).

    Class org.hd.d.pg2k.svrCore.vars.EventVariableValuePeriodRow extends java.lang.Object implements Serializable

    serialVersionUID: -614477516323489097L

    Serialization Methods

    readObject

    private void readObject(java.io.ObjectInputStream ois)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
    Deserialise.

    Throws:
    java.io.IOException
    java.lang.ClassNotFoundException
    Serialized Fields

    def

    SimpleVariableDefinition def
    The variable definition; never null.


    period

    EventPeriod period
    The event period; never null.


    all

    EventVariableValueBuffer all
    All events being collected, never null. Captures all events ever seen, but may be rescaled to prevent overflow, so should simply be regarded as a reasonably representative sub-sample.

    Will never be authoritative.


    current

    EventVariableValueBuffer current
    "Current" events being collected, never null. Will be replaced with new instance as the current one stops being current.

    Initially created with value suitable to receive a new event immediately.

    Will never be authoritative.


    historical

    EventVariableValue[] historical
    Set of "historical" periods, most-recent at index 0, possibly containing nulls; never null. Initially all nulls.

    The intervalNumber of any entry at index i must be current.getIntervalNumber()-1-i.

    FIXME: copy defensively during deserialisation.

    Class org.hd.d.pg2k.svrCore.vars.EventVariableValueSet extends java.lang.Object implements Serializable

    serialVersionUID: -1932690647089333134L

    Serialization Methods

    readResolve

    protected java.lang.Object readResolve()
    Deserialise: use constructor for validation, defensive copying, etc.

    Serialized Fields

    def

    SimpleVariableDefinition def
    The variable definition; never null.


    byPeriod

    java.util.EnumMap<K extends java.lang.Enum<K>,V> byPeriod
    Non-empty Map from period to period row; never null. Logically immutable once created (and thus thread-safe), though the values remain mutable.

    Class org.hd.d.pg2k.svrCore.vars.InstanceID extends java.lang.Object implements Serializable

    serialVersionUID: -2320309863687936784L

    Serialization Methods

    readResolve

    protected java.lang.Object readResolve()
                                    throws java.io.ObjectStreamException
    Deserialise: validate and eliminate duplicates coming off the wire. Ensures that there is never more than one copy of any given InstanceID value in memory (other than transiently).

    Throws:
    java.io.ObjectStreamException
    Serialized Fields

    ID

    long ID
    Unique (positive) long ID from a cryptographically-good random-number source.

    Class org.hd.d.pg2k.svrCore.vars.SimpleVariableDefinition extends java.lang.Object implements Serializable

    serialVersionUID: 2361192791747313629L

    Serialization Methods

    readResolve

    protected java.lang.Object readResolve()
                                    throws java.io.ObjectStreamException
    Deserialise: use constructor for validation, defensive copying, etc. We also use this to eliminate duplicate copies and thus conserve memory. We attempt to effectively intern() the entire definition and also the name.

    Throws:
    java.io.ObjectStreamException
    Serialized Fields

    name

    java.lang.String name
    The variable name; never null or empty.


    type

    int type
    The variable type; one of the TYPE_XXX values.


    persistent

    boolean persistent
    True if the variable value is to persist through restarts.


    readOnly

    boolean readOnly
    True if the variable is read-only; defaults to false.


    event

    boolean event
    True if the variable is read-only; defaults to false.


    evPeriodSubset

    java.util.EnumSet<E extends java.lang.Enum<E>> evPeriodSubset
    Event period/interval subset (immutable) to be collected, or null if not an event or all to be collected. If this is non-null then it is non-empty.


    local

    boolean local
    True if the variable is local; defaults to true.


    maxDiffEventCount

    int maxDiffEventCount
    Maximum number of different event values retained; defaults to 0.

    Class org.hd.d.pg2k.svrCore.vars.SimpleVariableValue extends java.lang.Object implements Serializable

    serialVersionUID: -5094323683052972705L

    Serialization Methods

    readResolve

    protected java.lang.Object readResolve()
    Deserialise: use constructor for validation, defensive copying, etc.

    Serialized Fields

    def

    SimpleVariableDefinition def
    The variable definition; never null.


    value

    java.lang.Object value
    The variable value; null or a type allowed by the definition.


    timestamp

    long timestamp
    The time at which the value object was constructed; strictly positive. This value comes with a deserialised object.


    globalMap

    java.util.Map<K,V> globalMap
    An immutable Map from InstanceID keys to SimpleVariableValues each of the same definition and with no global map. This contains an encapsulation of the constiuent values from each particpating system.

    It must be null for local variables.

    For global variables where this is non-null it must contain only keys that are distinct InstanceID values, and only values that are SimpleVariableValues with exactly the same definition and a null globalMap.

    Is immutable (if non-null) so that it can be returned directly.

    Never an empty Map; null is used in this case.


    Package org.hd.d.pg2k.test.dev

    Class org.hd.d.pg2k.test.dev.ServletTestsBase.DummyServlet extends javax.servlet.http.HttpServlet implements Serializable

    serialVersionUID: -3108217776198161903L


    Package org.hd.d.pg2k.webSvr.bgImg

    Class org.hd.d.pg2k.webSvr.bgImg.BgImageServlet extends javax.servlet.http.HttpServlet implements Serializable

    serialVersionUID: 2040799493050847367L


    Package org.hd.d.pg2k.webSvr.catalogue

    Class org.hd.d.pg2k.webSvr.catalogue.PaginationBeanBase extends java.lang.Object implements Serializable

    serialVersionUID: -3756427234954341532L

    Serialized Fields

    numberOfItems

    int numberOfItems
    Number of items to be paginated; non-negative. Defaults to zero meaning no items to paginate; any attempt to set it to a negative number sets it to zero.


    pg

    int pg
    The page number of the current page; strictly positive. Defaults to 1; any attempt to set it to an invalid value will set it to 1, which is always safe.

    The page number must be positive and less than numberOfPages() unless numberOfPages is 0, in which case the page number must be exactly 1.

    This property matches the property named by WebConsts.PAGE_NUMBER_PARAMETER to allow for easy setting of the property from a JSP.

    Class org.hd.d.pg2k.webSvr.catalogue.PaginationBeanNumeric extends PaginationBeanBase implements Serializable

    serialVersionUID: -5376824526954786928L

    Class org.hd.d.pg2k.webSvr.catalogue.PaginationBeanTree extends PaginationBeanBase implements Serializable

    serialVersionUID: 8393863768211031724L

    Serialized Fields

    nodePrefix

    Name nodePrefix
    Store of prefix for the current node. Default value is safe (Name.EMPTY, ie "").


    prefixList

    java.util.List<E> prefixList
    Store of prefix list. Default value is safe (the empty list).

    Class org.hd.d.pg2k.webSvr.catalogue.SearchPageJavaBean extends ExhibitHandlerBeanBase implements Serializable

    serialVersionUID: -8656439331186143583L

    Serialized Fields

    q

    java.lang.String q
    The sanitised simple text query, or "" if none.


    recentDaysFilter

    int recentDaysFilter
    The number of recent days to filter for; 0 means no filter.


    lastSearchTimeMs

    long lastSearchTimeMs
    Last search time in ms, -1 if no search yet done.

    Class org.hd.d.pg2k.webSvr.catalogue.TreeFilterServletAllExhibits extends TreeFilterServletBase implements Serializable

    serialVersionUID: 5283378272843090137L

    Class org.hd.d.pg2k.webSvr.catalogue.TreeFilterServletAllIcons extends TreeFilterServletBase implements Serializable

    serialVersionUID: -3815214610456191652L

    Class org.hd.d.pg2k.webSvr.catalogue.TreeFilterServletBase extends javax.servlet.http.HttpServlet implements Serializable

    serialVersionUID: 2376699413596151320L

    Serialized Fields

    tfb

    TreeFilterBean tfb
    Bean that holds cache of selected data in tree-form for us. Only created at init().


    Package org.hd.d.pg2k.webSvr.exhibit

    Class org.hd.d.pg2k.webSvr.exhibit.AbstractFilterBean extends java.lang.Object implements Serializable

    serialVersionUID: -4409526925504499328L

    Serialized Fields

    expr

    Expr expr
    The (filter/sorter) expression, or null if not yet set. Accessed under the instance lock.

    This is persisted if the object is serialised.


    memorySensitiveCache

    boolean memorySensitiveCache
    If true then led cached value go if we run short of memory, eg hold it via a SoftReference. This is useful for infrequently-accessed and not-too-expensive filters.

    This can be set or reset at any time but is only effective when the cache is filled, so is probably done once, before the first set of values is retrieved.

    By default this value is true and the cache is memory sensitive, ie won't cause the system to run out of memory.

    Accessed under the instance lock.

    This is persisted if the object is serialised.


    expiryInterval

    int expiryInterval
    Expiry interval in ms, zero (the default) means no automatic expiry; non-negative. The data may expire in a little less than this.

    Is volatile so as to allow access without a lock.


    observer

    AbstractFilterBean.MyObserver observer
    Embedded observer object. Designed to break link between DataSourceBean and our class to allow us to be GCed even if we are recorded as an observer.

    This inner object has only a SoftReference to us.


    emergencyFreeHook

    java.lang.Runnable emergencyFreeHook
    Callback for 'emergency free' from MemoryTools; never null after registration. We create and register this when we first call _select() and re-register it when it is called back.

    When it is called it unguards any SoftReferences allowing memory to be freed rather than an OutOfMemoryException getting thrown somewhere in the application.

    It is assumed that MemoryTools holds this via a WeakReference so that it will not inhibit this instance being GCed.


    name

    java.lang.String name
    Name for this instance; by default null.

    Class org.hd.d.pg2k.webSvr.exhibit.BuiltInFilters.filtAll extends java.lang.Object implements Serializable

    serialVersionUID: -3538216625320264998L

    Class org.hd.d.pg2k.webSvr.exhibit.BuiltInFilters.filtByAuthor extends java.lang.Object implements Serializable

    serialVersionUID: 1926524023966666518L

    Serialized Fields

    acceptableAuthors

    java.lang.String[] acceptableAuthors

    Class org.hd.d.pg2k.webSvr.exhibit.BuiltInFilters.filtByCategory extends java.lang.Object implements Serializable

    serialVersionUID: -2337407306687756258L

    Serialized Fields

    acceptableCategories

    java.lang.String[] acceptableCategories

    Class org.hd.d.pg2k.webSvr.exhibit.BuiltInFilters.filtByEstdLocationCentre extends java.lang.Object implements Serializable

    serialVersionUID: 1246204565122236630L

    Serialized Fields

    area

    Location.Estd area
    Particular location to filter by. If non-null, item must fall within the area delimited by this location to be considered.

    Class org.hd.d.pg2k.webSvr.exhibit.BuiltInFilters.filtNothing extends java.lang.Object implements Serializable

    serialVersionUID: 7375589684054049955L

    Class org.hd.d.pg2k.webSvr.exhibit.BuiltInFilters.filtPrefixMatch extends java.lang.Object implements Serializable

    serialVersionUID: 8580496714859968839L

    Serialized Fields

    prefix

    java.lang.String prefix
    The substring to match.

    Class org.hd.d.pg2k.webSvr.exhibit.BuiltInFilters.filtSimpleSubstringMatch extends java.lang.Object implements Serializable

    serialVersionUID: -5197565900747314559L

    Serialized Fields

    subString

    java.lang.String subString
    The substring to match.

    Class org.hd.d.pg2k.webSvr.exhibit.BuiltInFilters.filtSimpleSuffixMatch extends java.lang.Object implements Serializable

    serialVersionUID: -6968644372319333517L

    Serialized Fields

    suffix

    java.lang.String suffix
    The substring to match.

    Class org.hd.d.pg2k.webSvr.exhibit.BuiltInFilters.sortByGoodness extends java.lang.Object implements Serializable

    serialVersionUID: -5596318067630417407L

    Serialized Fields

    nMax

    int nMax
    If positive, is the maximum number of exhibits returned.

    Class org.hd.d.pg2k.webSvr.exhibit.BuiltInFilters.sortByName extends java.lang.Object implements Serializable

    serialVersionUID: 9042557392754106067L

    Serialized Fields

    sortType

    java.lang.String sortType
    Sort Comparator; null for default (simple) sort.

    Class org.hd.d.pg2k.webSvr.exhibit.BuiltInFilters.sortByTimestamp extends java.lang.Object implements Serializable

    serialVersionUID: -8775508119553092181L

    Class org.hd.d.pg2k.webSvr.exhibit.BuiltInFilters.sortRandomN extends java.lang.Object implements Serializable

    serialVersionUID: 2078921830149773203L

    Serialized Fields

    n

    int n
    The upper bound on result size.


    seed

    java.lang.String seed
    The seed; if null we use a non-repeatable source.

    Class org.hd.d.pg2k.webSvr.exhibit.BuiltInFilters.sortReverse extends java.lang.Object implements Serializable

    serialVersionUID: -3097396087855039990L

    Class org.hd.d.pg2k.webSvr.exhibit.DataSourceBean extends AbstractSimpleLogger implements Serializable

    serialVersionUID: -8932316265828567742L

    Serialization Methods

    readObject

    private void readObject(java.io.ObjectInputStream ois)
                     throws java.io.IOException,
                            java.lang.ClassNotFoundException
    Deserialise.

    Throws:
    java.io.IOException
    java.lang.ClassNotFoundException
    Serialized Fields

    logger

    WebUtils.ServletLoggerWithFallback logger
    Our logger which falls back to System.out if servlet log not available; never null.


    iterEPCM

    DataSourceBean.AEPLinkedKey iterEPCM
    Key for systematic EPCM recomputation (linked to AEP), Iterator; never null.


    PROPS_REPOST_INTERVAL_MS

    int PROPS_REPOST_INTERVAL_MS
    How often do we repost properties (ms, approx); strictly positive. This should be at least once per minute.


    _lastGoodPostProps

    long _lastGoodPostProps
    Note of the last time that we successfully ran raw properties repost without error. Private to _postProps().


    destroyed

    boolean destroyed
    Set true when the servlet is destroyed.


    _slave

    java.lang.Boolean _slave
    Indicates if this is a master or a slave Web server, or not known. "Not known" is indicated by a null value.

    This value may be persisted.

    Volatile to be accessed without a lock by isSlave() and setSlave().

    Must be set non-null to initialise the bean for use.

    May be able to be set immediately from the context.


    _rebuildJIB_lock

    java.util.concurrent.locks.ReentrantLock _rebuildJIB_lock
    Private lock for _rebuildJIB. Attempts by another thread to enter the lock are vetoed immediately, preventing other threads from blocking pointlessly.


    storeLinked

    java.util.concurrent.atomic.AtomicReference<V> storeLinked
    Thread-safe (highly-concurrent) AEP-linked store; initialised on demand; never null after construction/deserialisation. May be cleared if the system becomes very short of memory.


    storeUnlinked

    java.util.concurrent.atomic.AtomicReference<V> storeUnlinked
    Thread-safe (highly-concurrent) non-AEP-linked store; initialised on demand; never null after construction/deserialisation. May be cleared if the system becomes very short of memory.


    _efh

    DataSourceBean.EFH _efh
    Set up emergency to clear these stores under extreme memory stress.

    Class org.hd.d.pg2k.webSvr.exhibit.ExhibitServlet extends javax.servlet.http.HttpServlet implements Serializable

    serialVersionUID: -1774514190468389217L

    Serialized Fields

    initialised

    boolean initialised
    Private to init(); ensure exactly-once semantics for init().

    Class org.hd.d.pg2k.webSvr.exhibit.Expr extends java.lang.Object implements Serializable

    serialVersionUID: -881322470744786046L

    Serialized Fields

    upstream

    Expr upstream
    The upstream expression pipeline.

    Class org.hd.d.pg2k.webSvr.exhibit.FilterBean extends AbstractFilterBean implements Serializable

    serialVersionUID: -7508449420464606209L

    Class org.hd.d.pg2k.webSvr.exhibit.FilterExpr extends Expr implements Serializable

    serialVersionUID: -7059115865126107312L

    Serialized Fields

    filter

    FilterIF filter
    The filter we apply here; never null.

    Class org.hd.d.pg2k.webSvr.exhibit.SortExpr extends Expr implements Serializable

    serialVersionUID: -7947761366290611963L

    Serialized Fields

    sorter

    SortIF sorter
    The sort we apply here; never null.

    Class org.hd.d.pg2k.webSvr.exhibit.ThumbnailServlet extends javax.servlet.http.HttpServlet implements Serializable

    serialVersionUID: -2497705561191352995L

    Class org.hd.d.pg2k.webSvr.exhibit.TreeFilterBean extends AbstractFilterBean implements Serializable

    serialVersionUID: 8710974049842992459L

    Class org.hd.d.pg2k.webSvr.exhibit.TunnelServlet extends javax.servlet.http.HttpServlet implements Serializable

    serialVersionUID: -1276945887652232880L

    Serialized Fields

    logger

    WebUtils.ServletLoggerWithFallback logger
    Our logger which falls back to System.out if servlet log not available; never null.


    statsIDTSV

    StatsLogger.StatsConfig statsIDTSV
    The stats set to which we log general tunnel servlet stats. The unique codes are the constants TSNAME_XXX.


    _gSP_cache

    SecurityProps _gSP_cache
    Cached SecurityProps; private to getSecurityProps(); never null. Volatile so as to allow access without a lock.


    _RPC_cache

    ExhibitDataTunnelSource.HIRPCCache _RPC_cache
    Cache/lock object to optimise handling of incoming RPCs; never null.


    messageIDs

    DuplicateIDChecker<K> messageIDs
    Record of unique request packet IDs around our acceptance window; never null. We use the final MAC segment ID, as that covers the entire frame.

    We actually remember IDs for about twice the age implied by the skew so that if our clock is wrong by, or slips by, the maximum skew, we won't start admitting very old duplicate messages.

    We should only add IDs if possible when we are already fairly sure of the source and when we have, for example, already checked for acceptable skew, to make any sort of DoS attack against us harder.

    We should reject otherwise-acceptable messages that have an ID already present in this Map.

    Thread-safe.


    Package org.hd.d.pg2k.webSvr.location

    Class org.hd.d.pg2k.webSvr.location.LocThumbnailServlet extends javax.servlet.http.HttpServlet implements Serializable

    serialVersionUID: -8253998074827856644L


    Package org.hd.d.pg2k.webSvr.threeD

    Class org.hd.d.pg2k.webSvr.threeD.DataServlet extends javax.servlet.http.HttpServlet implements Serializable

    serialVersionUID: -1276945667652232880L

    Serialized Fields

    logger

    WebUtils.ServletLoggerWithFallback logger
    Our logger which falls back to System.out if servlet log not available; never null.


    statsIDDSV

    StatsLogger.StatsConfig statsIDDSV
    The stats set to which we log general tunnel servlet stats. The unique codes are the constants DSVNAME_XXX.

    Class org.hd.d.pg2k.webSvr.threeD.ThreeDMain extends javax.swing.JFrame implements Serializable

    serialVersionUID: 8885229711913005041L

    Serialized Fields

    logger

    SimpleLoggerIF logger
    Central logger instance for uploader; never null. This instance may log to the status bar and elsewhere.


    logic

    ThreeDLogic logic
    Our companion "business-logic" class; never null.


    status

    javax.swing.JLabel status
    Status bar; never null.


    sisListener

    ThreeDMain.SISListener sisListener
    Single listener instance.


    simpleUniverse

    com.sun.j3d.utils.universe.SimpleUniverse simpleUniverse
    Our simple universe; only null if Java3D not available or set-up not yet complete. Marked volatile for thread-safe lock-free access.


    canvas3D

    javax.media.j3d.Canvas3D canvas3D
    3D canvas for Java3D to draw on; only null if Java3D not available.


    exhibitsBranchGroup

    javax.media.j3d.BranchGroup exhibitsBranchGroup
    BranchGroup used to hold the exhibits; never null. This is set up to be writable/extendable at runtime so that we can update the exhibits scene as needed.


    sliderX

    javax.swing.JSlider sliderX
    X-axis slider; never null.


    sliderY

    javax.swing.JSlider sliderY
    Y-axis slider; never null.


    sliderZ

    javax.swing.JSlider sliderZ
    Z-axis slider; never null.


    currentSet

    LightweightMetaDataFetchInterface.GalleryBasicMetaData currentSet
    What exhibit set are we currently displaying; never null. When this changes we reconstruct our scene graph.

    Marked volatile for thread-safe lock-free access.

    Initially an empty set of exhibits.


    Package org.hd.d.pg2k.webSvr.upload

    Class org.hd.d.pg2k.webSvr.upload.UploadServlet extends javax.servlet.http.HttpServlet implements Serializable

    serialVersionUID: 4321077856636574117L


    Package org.hd.d.pg2k.webSvr.util

    Class org.hd.d.pg2k.webSvr.util.Breadcrumbs extends java.lang.Object implements Serializable

    serialVersionUID: -7990918038988551161L

    Serialized Fields

    crumbs

    java.util.List<E> crumbs
    This is our list of breadcrumbs, in order. We use a Vector so as to be inherently thread-safe.

    We expect that usually we will have no more than about four crumbs, and so default to that size.

    Class org.hd.d.pg2k.webSvr.util.Breadcrumbs.Breadcrumb extends java.lang.Object implements Serializable

    serialVersionUID: 6755765230040158278L

    Serialized Fields

    linkText

    java.lang.String linkText
    The text of the link; never null nor zero-length.


    link

    java.lang.String link
    The URL (possibly relative); never zero-length but may be null.

    Class org.hd.d.pg2k.webSvr.util.JavadocBundleServlet extends javax.servlet.http.HttpServlet implements Serializable

    serialVersionUID: 8287758876065863228L

    Class org.hd.d.pg2k.webSvr.util.LocaleBean extends LocaleBeanBase implements Serializable

    serialVersionUID: -6180248508840300659L

    Class org.hd.d.pg2k.webSvr.util.SessionVarBean extends java.lang.Object implements Serializable

    serialVersionUID: -200996533296387845L

    Serialized Fields

    rndToken

    int rndToken
    Immutable random token (shared with any clones/copies to save time) for cache-busting in URLs.


    sessionVarLiteUI

    boolean sessionVarLiteUI
    Lite UI; if true we should run a "lite" UI for users on slow modems, etc, else full UI. Full UI (flag off) is the default.


    sessionVarLocale

    java.util.Locale sessionVarLocale
    Session locale: if non-null this overrides any locale information from elsewhere. No override (null) is the default.

    Note that this field can only be set to Locales with a valid language code (ie two-letter lowercase) and an optional valid country code (ie two-letter uppercase) and no variant and that are found in our full supported-locales list. Note thae we do this validation since the Locale object does not (SHAME)!

    We ignore attempts to set to an unsupported/unsafe/broken locale.

    We rely on immutability of the Locale object here.


    Package org.hd.d.pg2k.webSvr.virtualHosts.AlohaEarth

    Class org.hd.d.pg2k.webSvr.virtualHosts.AlohaEarth.AEParams extends java.lang.Object implements Serializable

    serialVersionUID: 3079086832160645496L

    Serialized Fields

    zoomFactor

    int zoomFactor
    The current zoom factor. Constrained to lie between MIN_ZOOM and MAX_ZOOM inclusive, and INITIAL_ZOOM unless otherwise set (ie the initial value).


    eastOffset

    int eastOffset
    The East Offset of of the current view from original image. The offset is measured from the centre of the current image to the centre of the original underlying image, where either centre may potentially lie within a pixel or between pixels.

    This value is constrained to lie in the range [-BASE_2D_EARTH_MAP_WIDTH/2, +BASE_2D_EARTH_MAP_WIDTH/2].

    The initial value is zero.


    northOffset

    int northOffset
    The North Offset of of the current view from original image. As the centre of the user's view goes more north, this becomes more positive.

    The offset of measured from the centre of the current image to the centre of the original underlying image, where either centre may potentially lie within a pixel or between pixels.

    This value is constrained to lie in the range [-BASE_2D_EARTH_MAP_HEIGHT/2, +BASE_2D_EARTH_MAP_HEIGHT/2].

    Note that is is the negative of the change in the y axis which in computer graphics usually has higher values lower down.

    The initial value is zero.

    Class org.hd.d.pg2k.webSvr.virtualHosts.AlohaEarth.AlohaEarthMapServlet extends javax.servlet.http.HttpServlet implements Serializable

    serialVersionUID: -6552601635962150780L


    DHD Multimedia Gallery V1.60.69

    Copyright (c) 1996-2012, Damon Hart-Davis. All rights reserved.