1 package org.hibernate.cache; 3 4 import java.util.Comparator ; 5 6 28 public interface CacheConcurrencyStrategy { 29 30 37 public Object get(Object key, long txTimestamp) throws CacheException; 38 49 public boolean put( 50 Object key, 51 Object value, 52 long txTimestamp, 53 Object version, 54 Comparator versionComparator, 55 boolean minimalPut) 56 throws CacheException; 57 58 59 69 public SoftLock lock(Object key, Object version) throws CacheException; 70 71 72 76 public void evict(Object key) throws CacheException; 77 82 public boolean update(Object key, Object value) throws CacheException; 83 88 public boolean insert(Object key, Object value) throws CacheException; 89 90 91 98 public void release(Object key, SoftLock lock) throws CacheException; 99 104 public boolean afterUpdate(Object key, Object value, Object version, SoftLock lock) 105 throws CacheException; 106 111 public boolean afterInsert(Object key, Object value, Object version) 112 throws CacheException; 113 114 115 121 public void remove(Object key) throws CacheException; 122 126 public void clear() throws CacheException; 127 130 public void destroy(); 131 135 public void setCache(Cache cache); 136 137 142 public static interface SoftLock {} 143 144 147 public String getRegionName(); 148 149 152 public Cache getCache(); 153 } 154 155 156 157 158 159 160 | Popular Tags |