Class RefreshableSegment

  • All Implemented Interfaces:
    Segment, Runnable

    public class RefreshableSegment
    extends Object
    implements Runnable, Segment
    A SegmentFetcher implementation that can periodically refresh itself.
    Author:
    adil
    • Method Detail

      • contains

        public boolean contains​(String key)
        Description copied from interface: Segment
        This method MUST NOT throw any exceptions.
        Specified by:
        contains in interface Segment
        Returns:
        true if this segment contains the key. false otherwise.
      • forceRefresh

        public void forceRefresh()
        Description copied from interface: Segment
        Forces a sync of the segment with the remote server, outside of any scheduled syncs. This method MUST NOT throw any exceptions.
        Specified by:
        forceRefresh in interface Segment
      • changeNumber

        public long changeNumber()
      • run

        public void run()
        Specified by:
        run in interface Runnable