Interface PartitionManager

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void deleteOldPartitions​(long ageMS)
      Deletes any partitions whose end is older than the given age.
      java.util.List<Partition> getMostRecentPartitions​(int count, long windowSize)
      Retrieves partitions order by start time desc.
      java.util.List<Partition> getOlderPartitions​(long time, long windowSize, int limit)
      Retrieves the partitions with data equal to or older than the specified time, sorted DESC (most recent first).
      Partition getPartition​(long time, long windowSize)
      Retrieves the partition that contains the given time, as close to the resolution as possible
      java.util.List<Partition> getPartitions​(long start, long end, long windowSize)
      Returns the partitions that span the given time range, order by start ASC.
      void initialize()  
      void shutdown()  
    • Method Detail

      • initialize

        void initialize()
                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shutdown

        void shutdown()
      • getPartition

        Partition getPartition​(long time,
                               long windowSize)
                        throws java.lang.Exception
        Retrieves the partition that contains the given time, as close to the resolution as possible
        Throws:
        java.lang.Exception
      • getPartitions

        java.util.List<Partition> getPartitions​(long start,
                                                long end,
                                                long windowSize)
                                         throws java.lang.Exception
        Returns the partitions that span the given time range, order by start ASC.
        Throws:
        java.lang.Exception
      • getOlderPartitions

        java.util.List<Partition> getOlderPartitions​(long time,
                                                     long windowSize,
                                                     int limit)
                                              throws java.lang.Exception
        Retrieves the partitions with data equal to or older than the specified time, sorted DESC (most recent first).
        Parameters:
        limit - if 0, no limit, otherwise only returns up to that many partitions.
        Throws:
        java.lang.Exception
      • getMostRecentPartitions

        java.util.List<Partition> getMostRecentPartitions​(int count,
                                                          long windowSize)
                                                   throws java.lang.Exception
        Retrieves partitions order by start time desc. Only returns up to the number specified by count.
        Throws:
        java.lang.Exception
      • deleteOldPartitions

        void deleteOldPartitions​(long ageMS)
                          throws java.lang.Exception
        Deletes any partitions whose end is older than the given age.
        Throws:
        java.lang.Exception