001/*
002 * Copyright (c) 2006-2011 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the Eclipse Public License v1.0
006 * which accompanies this distribution, and is available at
007 * http://www.eclipse.org/legal/epl-v10.html
008 *
009 * Contributors:
010 *     Florent Guillaume
011 */
012
013package org.nuxeo.ecm.core.storage.sql;
014
015/**
016 * Encapsulates cluster node VCS invalidations management.
017 * <p>
018 * There is one cluster invalidator per cluster node (repository).
019 *
020 * @since 7.4
021 */
022public interface ClusterInvalidator {
023
024    /**
025     * Initializes the cluster invalidator.
026     *
027     * @param nodeId the cluster node id
028     * @param repository the repository
029     */
030    void initialize(String nodeId, RepositoryImpl repository);
031
032    /**
033     * Closes this cluster invalidator and releases resources.
034     */
035    void close();
036
037    /**
038     * Receives invalidations from other cluster nodes.
039     */
040    Invalidations receiveInvalidations();
041
042    /**
043     * Sends invalidations to other cluster nodes.
044     */
045    void sendInvalidations(Invalidations invalidations);
046
047}