Interface HasExpirationTimeout

  • All Known Subinterfaces:
    CollaborationList, CollaborationMap
    All Known Implementing Classes:
    CollaborationBinder, FormManager

    public interface HasExpirationTimeout
    Common interface to be implemented by types holding data associated to a topic, which provides methods to set an expiration timeout on the data which will be cleared after the timeout has passed since the last connection to the topic has been closed.
    Since:
    3.1
    Author:
    Vaadin Ltd.
    • Method Detail

      • getExpirationTimeout

        Optional<Duration> getExpirationTimeout()
        Gets the optional expiration timeout of the data. An empty Optional is returned if no timeout is set, which means data is not cleared when there are no connected users to the related topic (this is the default).
        Returns:
        the expiration timeout
      • setExpirationTimeout

        void setExpirationTimeout​(Duration expirationTimeout)
        Sets the expiration timeout of the data held by the implementing object. If set, data is cleared when expirationTimeout has passed after the last connection to the related topic is closed. If set to null, the timeout is cancelled.
        Parameters:
        expirationTimeout - the expiration timeout