Skip to main content
summaryrefslogtreecommitdiffstats
blob: 6822725f897ab71b32312e8a15fab6c3095c1b5b (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/***************************************************************************
 * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
 * 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:
 *    Eike Stepper - initial API and implementation
 **************************************************************************/
package org.eclipse.emf.cdo.server;

import org.eclipse.emf.cdo.internal.server.StoreUtil;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.protocol.model.CDOClassRef;
import org.eclipse.emf.cdo.protocol.model.CDOFeature;
import org.eclipse.emf.cdo.protocol.model.CDOPackage;
import org.eclipse.emf.cdo.protocol.model.CDOPackageInfo;
import org.eclipse.emf.cdo.protocol.revision.CDORevision;

import org.eclipse.net4j.util.io.CloseableIterator;

import java.util.Collection;

/**
 * @see StoreUtil#getReader()
 * @author Eike Stepper
 */
public interface IStoreReader extends IStoreAccessor
{
  public ISession getSession();

  public IStoreChunkReader createChunkReader(CDORevision revision, CDOFeature feature);

  public Collection<CDOPackageInfo> readPackageInfos();

  /**
   * Demand loads a given package proxy that has been created on startup of the repository.
   */
  public void readPackage(CDOPackage cdoPackage);

  /**
   * Returns an iterator that iterates over all objects in the store and makes their ids available for processing. This
   * method is supposed to be called very infrequently, for example during the recovery from a crash.
   */
  public CloseableIterator<CDOID> readObjectIDs(boolean withTypes);

  /**
   * Reads the type of an object from the associated store and returns a class reference of it. This method is supposed
   * to be called very infrequently if the {@link IStore#hasEfficientTypeLookup()} returns <code>false</code>.
   */
  public CDOClassRef readObjectType(CDOID id);

  public CDORevision readRevision(CDOID id, int referenceChunk);

  public CDORevision readRevisionByTime(CDOID id, int referenceChunk, long timeStamp);

  public CDORevision readRevisionByVersion(CDOID id, int referenceChunk, int version);

  public CDOID readResourceID(String path);

  public String readResourcePath(CDOID id);

  public CDORevision verifyRevision(CDORevision revision);
}

Back to the top