1 /*******************************************************************************
2 * Copyright (c) 2017 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Semantum Oy - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.db.indexing.internal;
14 import java.io.IOException;
15 import java.nio.file.Path;
16 import java.util.HashSet;
20 * An internal in-memory container for telling whether a certain index has been
21 * changed since the platform was last started up.
23 * @author Jussi Koskela
26 public class IndexChangedWriter {
27 private Set<Path> dirtyFiles = new HashSet<>();
29 public synchronized boolean markDirty(Path dirtyFile) throws IOException {
30 return dirtyFiles.add(dirtyFile);