1 package org.myoodb.core; 25 26 import java.io.Serializable ; 27 28 public abstract interface AbstractLock extends Serializable 29 { 30 public final static int NOT_ACQUIRED = -1; 31 public final static int ACCESS_NONE = 0; 32 public final static int ACCESS_READ = 1; 33 public final static int ACCESS_WRITE = 2; 34 public final static int ACCESS_MIGHTY_WRITE = 3; 35 public final static int ACCESS_MAX = 4; 36 37 public int tryAcquire(AbstractTransaction tx, int level); 38 39 public void release(AbstractTransaction tx); 40 41 public long getLockIdentifier(); 42 43 public int getLockLevel(AbstractTransaction tx); 44 45 public int getLockLevel(); 46 47 public void reset(); 48 } 49 | Popular Tags |