com.ibm.rational.test.lt.testgen.core.store

Interface IPacketReferenceStore



  • public interface IPacketReferenceStore
    Provides a scalable storage area for large lists of packet references. An instance works in two successive phases: the write phase and the read phase. It is not possible to go back to the write phase once the read phase has been reached.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void add(IRecorderPacketReference ref, long minPendingPacketTime)
      Adds a packet reference.
      void complete()
      Completes this store.
      void dispose()
      Disposes this store.
      void flush(IPacketReferenceOutputStream outputStream, long minPendingPacketTime)
      Completes this store if this is not already done, and sends its content to the specified stream.
      IPacketStoreIterator iterator()
      Returns an iterator that allows to iterate through the list of packet references that were added to this store, in the same order as they were added.
      int size()
      Returns the count of packet references in the store.
    • Method Detail

      • add

        void add(IRecorderPacketReference ref,
               long minPendingPacketTime)
                 throws IOException
        Adds a packet reference. Can be invoked only when the store has not been completed yet.
        Parameters:
        ref - A packet reference.
        minPendingPacketTime - The lowest start time of all packets that may be added to this packet store after this packet is added.
        Throws:
        IOException - If the packet could not be stored (usually because there is no more disk space), or if this store has already been completed.
      • size

        int size()
        Returns the count of packet references in the store.
        Returns:
        the count of packet references in the store.
      • complete

        void complete()
                      throws IOException
        Completes this store. No more packets can be added.
        Throws:
        IOException - If a disk-related problem occurred.
      • dispose

        void dispose()
        Disposes this store. This can be invoked in any phase and discards any data that was stored by this store. Note that only packet references are lost, not necessarily packets.
      • flush

        void flush(IPacketReferenceOutputStream outputStream,
                 long minPendingPacketTime)
                   throws IOException
        Completes this store if this is not already done, and sends its content to the specified stream. This is equivalent to iterating through all items and writing them individually to the output stream.
        Parameters:
        outputStream - The output stream where packets should be written to.
        minPendingPacketTime - The lowest start time of all packets that may be sent to the output after the store content is flushed.
        Throws:
        IOException
      • iterator

        IPacketStoreIterator iterator()
                                      throws IOException
        Returns an iterator that allows to iterate through the list of packet references that were added to this store, in the same order as they were added. Invoking this method completes the store if this was not already done.
        Returns:
        Throws:
        IOException
IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2013. All rights reserved.