Class ReadOnlyAdminData


  • @Deprecated
    public class ReadOnlyAdminData
    extends AdminData
    Deprecated.
    This class is only used by the deprecated class FileBasedActiveBitPreservation.
    A version of AdminData that cannot be changed, but which allows synchronization through a file.

    To avoid excessive reading of the admin data file and constant stat() calls, users of this are required call synchronize() before major chunks of use to ensure that the data are up to date.

    Implementation note: Two alternative synch strategies are

    1) Recreate ReadOnlyAdminData before every use -- this requires reading the entire file again (millions of lines).
    2) Synchronize at every entry point (hasEntry, getState etc) -- this requires an expensive stat() call before every action, costly when iterating.

    • Field Detail

      • lastModified

        protected long lastModified
        Deprecated.
        The time the underlying file (adminDataFile) was last read in. If 0, we have never read admin data (the file doesn't exist).
    • Constructor Detail

      • ReadOnlyAdminData

        public ReadOnlyAdminData()
        Deprecated.
        See Also:
        AdminData()
    • Method Detail

      • getInstance

        public static ReadOnlyAdminData getInstance()
        Deprecated.
        Returns _an_ instance if admin data. This is _not_ a singleton.
        Returns:
        An instance of ReadOnlyAdminData
      • read

        protected void read()
        Deprecated.
        Read admin data. This should not be used, use synchronize instead, which only rereads when necessary.
        Overrides:
        read in class AdminData
      • synchronize

        public void synchronize()
        Deprecated.
        Make sure that the internal admin data set is synchronized to the file.