Package ptolemy.actor

Class TokenGotEvent


  • @Deprecated
    public class TokenGotEvent
    extends java.lang.Object
    Deprecated.
    Use IOPortEvent instead.
    An event that is published by IOPorts whenever get or getInside is called. The appropriate event should be published whenever a token is taken out from the port's queue by the actor code. In Kepler the provenance recorder uses these events to save intermediate results of the workflow. In the future these events could be used for "smart" reruns or a fault tolerance mechanism.
    Since:
    Ptolemy II 6.1
    Version:
    $Id$
    Author:
    Norbert Podhorszki
    Pt.AcceptedRating:
    Red (pnorbert)
    Pt.ProposedRating:
    Red (pnorbert)
    • Constructor Summary

      Constructors 
      Constructor Description
      TokenGotEvent​(IOPort sink, int channel, Token[] tokens, int vectorLength, boolean outside)
      Deprecated.
      Create a new token got event with the given parameters.
      TokenGotEvent​(IOPort sink, int channel, Token token, boolean outside)
      Deprecated.
      Create a new token got event with the given parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      int getChannel()
      Deprecated.
      Return the channel the token was received on.
      boolean getOutsideFlag()
      Deprecated.
      Return the direction flag (outside or inside).
      IOPort getPort()
      Deprecated.
      Return the port that the token was received at.
      Token getToken()
      Deprecated.
      Return the token that was received by the IOPort.
      Token[] getTokenArray()
      Deprecated.
      Return the array of tokens that was received by the IOPort.
      int getVectorLength()
      Deprecated.
      Return the number of tokens in the array taken at the IOPort.
      java.lang.String toString()
      Deprecated.
      Return a string representation of this event.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TokenGotEvent

        public TokenGotEvent​(IOPort sink,
                             int channel,
                             Token[] tokens,
                             int vectorLength,
                             boolean outside)
        Deprecated.
        Create a new token got event with the given parameters. This constructor is used when an array of tokens is taken.
        Parameters:
        sink - The IOPort the token is stored at.
        channel - Channel the token was received on.
        tokens - The token array used for the get.
        vectorLength - The number of tokens taken.
        outside - True if the token was taken on outside channel, false otherwise.
      • TokenGotEvent

        public TokenGotEvent​(IOPort sink,
                             int channel,
                             Token token,
                             boolean outside)
        Deprecated.
        Create a new token got event with the given parameters. This constructor is used when a token is taken using get or getInside.
        Parameters:
        sink - The IOPort the token is stored at.
        channel - Channel the token was received on.
        token - The token that was received.
        outside - True if the token was taken on outside channel, false otherwise.
    • Method Detail

      • getChannel

        public int getChannel()
        Deprecated.
        Return the channel the token was received on.
        Returns:
        The channel number.
      • getPort

        public IOPort getPort()
        Deprecated.
        Return the port that the token was received at.
        Returns:
        An instance of IOPort.
      • getToken

        public Token getToken()
        Deprecated.
        Return the token that was received by the IOPort. The variable _token will be null if the event was for a get array. To get the tokens that were received use getTokenArray() instead.
        Returns:
        The token received at the IOPort.
      • getTokenArray

        public Token[] getTokenArray()
        Deprecated.
        Return the array of tokens that was received by the IOPort. The variable _tokenArray will be null if an individual token was got instead of an array.
        Returns:
        The array of tokens which were taken.
      • getVectorLength

        public int getVectorLength()
        Deprecated.
        Return the number of tokens in the array taken at the IOPort. The variable _vectorLength will be -1 if an individual token was taken instead of an array of tokens.
        Returns:
        The number of tokens taken at the port.
      • getOutsideFlag

        public boolean getOutsideFlag()
        Deprecated.
        Return the direction flag (outside or inside). The flag is true, if the token was taken from outside, false if from inside
        Returns:
        The direction flag.
      • toString

        public java.lang.String toString()
        Deprecated.
        Return a string representation of this event.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A user-readable string describing the event.