1 17 18 package org.apache.tomcat.jni; 19 20 25 26 public class Lock { 27 28 33 34 public static final int APR_LOCK_FCNTL = 0; 35 public static final int APR_LOCK_FLOCK = 1; 36 public static final int APR_LOCK_SYSVSEM = 2; 37 public static final int APR_LOCK_PROC_PTHREAD = 3; 38 public static final int APR_LOCK_POSIXSEM = 4; 39 public static final int APR_LOCK_DEFAULT = 5; 40 41 60 public static native long create(String fname, int mech, long pool) 61 throws Error ; 62 63 74 public static native long childInit(String fname, long pool) 75 throws Error ; 76 77 82 public static native int lock(long mutex); 83 84 91 public static native int trylock(long mutex); 92 93 97 public static native int unlock(long mutex); 98 99 103 public static native int destroy(long mutex); 104 105 109 public static native String lockfile(long mutex); 110 111 116 public static native String name(long mutex); 117 118 121 public static native String defname(); 122 123 } 124 | Popular Tags |