1 9 package org.ozoneDB.core; 10 11 import org.ozoneDB.DxLib.DxCollection; 12 13 import java.io.Serializable ; 14 15 16 25 public interface Lock extends Serializable { 26 27 public final static int NOT_ACQUIRED = -1; 28 public final static int LEVEL_NONE = 0; 29 public final static int LEVEL_READ = 1; 30 public final static int LEVEL_UPGRADE = 2; 31 public final static int LEVEL_WRITE = 4; 32 public final static int LEVEL_MAX = 5; 34 35 36 public void reset(); 37 38 39 45 public void checkDeadlock( Transaction ta ) throws TransactionError; 46 47 55 public int tryAcquire( Transaction ta, int level ); 56 57 58 61 public void release( Transaction ta ); 62 63 64 public boolean isAcquiredBy( Transaction ta ); 65 66 67 70 public DxCollection lockerIDs(); 71 72 82 public int level( Transaction ta ); 83 84 } 85 | Popular Tags |