Class LastModificationState

  • All Implemented Interfaces:
    java.io.Serializable

    public class LastModificationState
    extends java.lang.Object
    implements java.io.Serializable
    Stores information about the time and DatabaseModificationKind of the last modification, separately for each kind of database object.

    A DatabaseModificationKind has two bits of information:

    Instances of LastModificationState store for each combination of object kind and operation kind the time stamp of last invocation of a service method annotated with either DatabaseCreateOrDeleteModification or DatabaseUpdateModification.

    The method getLastModificationTime(DatabaseModificationKind) allows to retrieve this time stamp.

    The service method ICommonServer.getLastModificationState(String) provides an instance of this class with the latest time stamps. It can be used by a client to update views (see for example ch.systemsx .cisd.openbis.generic.client.web.client.application.framework.LastModificationStateUpdater).

    Note, that only the kind of object not the actual type or even instance is stored. That means for example that the creation of a new sample will lead to an update of any sample detailed view in the Web GUI.

    See Also:
    Serialized Form
    • Constructor Detail

      • LastModificationState

        public LastModificationState()
        Creates a state marking all
    • Method Detail

      • getLastModificationTime

        public long getLastModificationTime​(DatabaseModificationKind kind)
        To avoid expensive computation of the last modification time at the beginning (which would require browsing the whole database) at the beginning we assume that it's equal to the initialization time of the whole state. We can do this since all the future modifications will happen after this moment.
        Returns:
        The last registered time of the specified kind of database modification.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object