Package ptolemy.actor

Class TokenSentEvent


  • @Deprecated
    public class TokenSentEvent
    extends java.lang.Object
    Deprecated.
    Use IOPortEvent instead.
    An event that is published by IOPorts whenever broadcast, send or sendInside is called. The appropriate event should be published whenever a token is transferred from one port to another. 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 5.2
    Version:
    $Id$
    Author:
    Oscar Barney
    Pt.AcceptedRating:
    Red (barney)
    Pt.ProposedRating:
    Red (barney)
    • Constructor Summary

      Constructors 
      Constructor Description
      TokenSentEvent​(IOPort source, int channel, Token token)
      Deprecated.
      Create a new token sent event with the given parameters.
      TokenSentEvent​(IOPort source, int channel, Token[] tokens, int vectorLength)
      Deprecated.
      Create a new token sent event with the given parameters.
      TokenSentEvent​(IOPort source, Token token)
      Deprecated.
      Create a new token sent event with the given parameters.
      TokenSentEvent​(IOPort source, Token[] tokens, int vectorLength)
      Deprecated.
      Create a new token sent 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 sent on.
      IOPort getPort()
      Deprecated.
      Return the port that the token was sent from.
      Token getToken()
      Deprecated.
      Return the token that was sent by the IOPort.
      Token[] getTokenArray()
      Deprecated.
      Return the array of tokens that the IOPort sent.
      int getVectorLength()
      Deprecated.
      Return the number of tokens in the array sent by 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

      • TokenSentEvent

        public TokenSentEvent​(IOPort source,
                              int channel,
                              Token[] tokens,
                              int vectorLength)
        Deprecated.
        Create a new token sent event with the given parameters. This constructor is used when an array of tokens is sent.
        Parameters:
        source - The IOPort the token came from.
        channel - Channel the token was sent on.
        tokens - The token array used for the send.
        vectorLength - The number of tokens sent.
      • TokenSentEvent

        public TokenSentEvent​(IOPort source,
                              int channel,
                              Token token)
        Deprecated.
        Create a new token sent event with the given parameters. This constructor is used when a token is sent or sent inside.
        Parameters:
        source - The IOPort the token came from.
        channel - Channel the token was sent on.
        token - The token that was sent.
      • TokenSentEvent

        public TokenSentEvent​(IOPort source,
                              Token token)
        Deprecated.
        Create a new token sent event with the given parameters. This constructor is used when a token is broadcast.
        Parameters:
        source - The IOPort the token came from.
        token - The token that was sent.
      • TokenSentEvent

        public TokenSentEvent​(IOPort source,
                              Token[] tokens,
                              int vectorLength)
        Deprecated.
        Create a new token sent event with the given parameters. This constructor is used when an array of tokens is broadcast.
        Parameters:
        source - The IOPort the token came from.
        tokens - The token array used for the broadcast.
        vectorLength - The number of tokens sent.
    • Method Detail

      • getChannel

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

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

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

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

        public int getVectorLength()
        Deprecated.
        Return the number of tokens in the array sent by the IOPort. The variable _vectorLength will be -1 if an individual token was sent instead of an array of tokens.
        Returns:
        The number of tokens sent by the port.
      • 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.