Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: cb0dac0f83924e2147fd58b6572235bf95dacd3a (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
66
/*
 * Copyright (c) 2011-2013, 2015 Eike Stepper (Berlin, Germany) and others.
 * 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:
 *    Caspar De Groot - initial API and implementation
 */
package org.eclipse.emf.cdo.spi.common.lock;

import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.lock.CDOLockOwner;
import org.eclipse.emf.cdo.common.lock.CDOLockState;
import org.eclipse.emf.cdo.internal.common.lock.CDOLockStateImpl;

/**
 * If the meaning of this type isn't clear, there really should be more of a description here...
 *
 * @author Caspar De Groot
 * @since 4.1
 * @noextend This interface is not intended to be extended by clients.
 * @noimplement This interface is not intended to be implemented by clients.
 */
public interface InternalCDOLockState extends CDOLockState
{
  /**
   * @since 4.6
   */
  public static final CDOLockState UNLOCKED = new CDOLockStateImpl(CDOID.NULL);

  public void addReadLockOwner(CDOLockOwner lockOwner);

  public boolean removeReadLockOwner(CDOLockOwner lockOwner);

  public void setWriteLockOwner(CDOLockOwner lockOwner);

  public void setWriteOptionOwner(CDOLockOwner lockOwner);

  /**
   * @since 4.4
   */
  public boolean removeOwner(CDOLockOwner lockOwner);

  /**
   * @since 4.2
   * @deprecated As of 4.5 use {@link InternalCDOLockState#updateFrom(CDOLockState)} instead.
   * The lockedObject field cannot be changed because it is used to compute the hash code.
   * Instantiate a new {@link CDOLockState} object if you want to update the lockedObject field.
   */
  @Deprecated
  public void updateFrom(Object object, CDOLockState source);

  /**
   * Update the {@link CDOLockOwner lockOwners} of this lock state from the one passed in.
   *
   * @since 4.5
   */
  public void updateFrom(CDOLockState source);

  /**
   * @since 4.2
   */
  public void dispose();
}

Back to the top