Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 2cf0c1279af1e72b4c6832d837fe3eb02bbfebdb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*******************************************************************************
 * Copyright (c) 2004 Peter Nehrer and Composent, Inc.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     Peter Nehrer - initial API and implementation
 *******************************************************************************/
package org.eclipse.ecf.sdo;

import org.eclipse.ecf.core.identity.ID;

/**
 * Interface used by service implementations to notify the application that a
 * change has been made to the data graph by a remote group member.
 * 
 * @author pnehrer
 */
public interface IUpdateConsumer {

    /**
     * Consumes the remote update. The implementor is expected to leave behind
     * an empty Change Summary.
     * 
     * @param graph
     *            shared data graph whose remote changes to consume
     * @param containerID
     *            id of the remote container that made the change
     * @return <code>true</code> if the update has been consumed,
     *         <code>false</code> otherwise (the update will be rejected as a
     *         result)
     */
    boolean consumeUpdate(ISharedDataGraph graph, ID containerID);

    /**
     * Notifies the implementor that a remote update has been received, but was
     * not successfully applied (i.e., cannot be consumed).
     * 
     * @param graph
     *            shared data graph whose update failed
     * @param containerID
     *            id of the container that sent the update
     */
    void updateFailed(ISharedDataGraph graph, ID containerID);
}

Back to the top