]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/ImmutableIndexedRelationsSearcher.java
Add logging to indexing & replace File-API with NIO Path-API
[simantics/platform.git] / bundles / org.simantics.db.indexing / src / org / simantics / db / indexing / ImmutableIndexedRelationsSearcher.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
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
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.db.indexing;
13
14 import org.eclipse.core.runtime.IProgressMonitor;
15 import org.simantics.db.RequestProcessor;
16 import org.simantics.db.Resource;
17 import org.simantics.db.Session;
18 import org.slf4j.Logger;
19 import org.slf4j.LoggerFactory;
20
21 /**
22  * @author Tuukka Lehtonen
23  * @author Antti Villberg
24  */
25 public class ImmutableIndexedRelationsSearcher extends IndexedRelationsSearcherBase {
26
27         ImmutableIndexedRelationsSearcher(RequestProcessor session, Resource relation, Resource input) {
28                 super(session, relation, input);
29         }
30
31         @Override
32         String getDescriptor() {
33                 return "IMMU:";
34         }
35         
36     @Override
37     Throwable bestEffortClear(IProgressMonitor monitor, Session session) {
38         return new IllegalStateException("Immutable index cannot be cleared");
39     }
40
41     @Override
42     protected Logger getLogger() {
43         return LoggerFactory.getLogger(ImmutableIndexedRelationsSearcher.class);
44     }
45         
46 }