You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marko A. Rodriguez (JIRA)" <ji...@apache.org> on 2016/02/05 19:50:44 UTC

[jira] [Created] (TINKERPOP-1132) Messenger.receiveMessages() Iterator should .remove().

Marko A. Rodriguez created TINKERPOP-1132:
---------------------------------------------

             Summary: Messenger.receiveMessages() Iterator should .remove().
                 Key: TINKERPOP-1132
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1132
             Project: TinkerPop
          Issue Type: Improvement
          Components: process
    Affects Versions: 3.1.1-incubating
            Reporter: Marko A. Rodriguez
            Assignee: Marko A. Rodriguez
             Fix For: 3.2.0-incubating


{code}
public interface Messenger<M> {

    /**
     * Receive all incoming messages to the currently executing vertex.
     *
     * @return the messages for the vertex
     */
    public Iterator<M> receiveMessages();

    /**
     * The currently executing vertex can send a message with provided {@link MessageScope}.
     *
     * @param messageScope the message scope of the message being sent
     * @param message      the message to send
     */
    public void sendMessage(final MessageScope messageScope, final M message);
}
{code}

The Iterator from {{recieveMessages()}} should be drained with each {{.next()}}. We can't force a provider to do it (as its not testable), but we can do it for {{SparkGraphComptuer}}, {{GiraphGraphComputer}}, and {{TinkerGraphComputer}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)