1 7 package org.jboss.cache.aop; 8 9 import org.jboss.aop.Advised; 10 import org.jboss.aop.ClassInstanceAdvisor; 11 import org.jboss.aop.InstanceAdvisor; 12 import org.jboss.aop.advice.Interceptor; 13 import org.jboss.aop.proxy.ClassProxy; 14 import org.jboss.cache.*; 15 import org.jboss.cache.transaction.BatchModeTransactionManager; 16 import org.jboss.cache.eviction.AopEvictionPolicy; 17 import org.jboss.util.NestedRuntimeException; 18 import org.jgroups.JChannel; 19 20 import javax.transaction.*; 21 import java.io.Serializable ; 22 import java.lang.reflect.Field ; 23 import java.util.*; 24 25 43 public class TreeCacheAop extends TreeCache implements TreeCacheAopMBean 44 { 45 protected Map cachedTypes = new WeakHashMap(); 48 public static final String CLASS_INTERNAL = "jboss:internal:class"; 49 public static final Fqn JBOSS_INTERNAL = new Fqn("JBossInternal"); 50 public static final String DUMMY = "dummy"; 51 TransactionManager localTm_ = BatchModeTransactionManager.getInstance(); 53 54 55 public TreeCacheAop(String cluster_name, 56 String props, 57 long state_fetch_timeout) 58 throws Exception 59 { 60 super(cluster_name, props, state_fetch_timeout); 61 } 62 63 public TreeCacheAop() throws Exception 64 { 65 } 66 67 public TreeCacheAop(JChannel channel) throws Exception 68 { 69 super(channel); 70 } 71 72 77 public void setEvictionPolicyClass(String eviction_policy_class) { 78 this.eviction_policy_class=eviction_policy_class; 79 if(eviction_policy_class == null || eviction_policy_class.length() ==0) 80 return; 81 82 try { 83 Object obj = getClass().getClassLoader().loadClass(eviction_policy_class).newInstance(); 84 if( ! (obj instanceof AopEvictionPolicy)) 85 throw new RuntimeException ("TreeCacheAop.setEvictionPolicyClass(). Eviction policy provider:" + 86 eviction_policy_class +" is not an instance of AopEvictionPolicy."); 87 eviction_policy_provider =(TreeCacheListener) obj; 88 this.addTreeCacheListener(eviction_policy_provider ); 89 } 90 catch(RuntimeException ex) { 91 log.error("setEvictionPolicyClass(): failed creating instance of " + eviction_policy_class, ex); 92 throw ex; 93 } 94 catch(Throwable t) { 95 log.error("setEvictionPolicyClass(): failed creating instance of " + eviction_policy_class, t); 96 } 97 } 98 99 113 public Object putObject(String fqn, Object obj) throws CacheException 114 { 115 return putObject(Fqn.fromString(fqn), obj); 116 } 117 118 132 public Object putObject(Fqn fqn, Object obj) throws CacheException 133 { 134 if( hasCurrentTransaction() ) { 136 return _putObject(fqn, obj); 137 } else 138 { 139 try 141 { 142 localTm_.begin(); 143 put(fqn, DUMMY, DUMMY); 145 Object objOld = _putObject(fqn,obj); 146 remove(fqn, DUMMY); 147 return objOld; 148 } 149 catch (Exception e) 150 { 151 e.printStackTrace(); 152 try 153 { 154 localTm_.setRollbackOnly(); 155 } 156 catch (Exception exn) 157 { 158 exn.printStackTrace(); 159 } 160 throw new NestedRuntimeException("TreeCacheAop.putObject(): ", e); 161 } 162 finally 163 { 164 endTransaction(); 165 } 166 } 167 } 168 169 protected void endTransaction() 170 { 171 try { 172 if(localTm_.getTransaction().getStatus() != Status.STATUS_MARKED_ROLLBACK) 173 { 174 localTm_.commit(); 175 } else 176 { 177 localTm_.rollback(); 178 } 179 } catch (Exception e) { 180 e.printStackTrace(); 181 throw new NestedRuntimeException("TreeCacheAop.endTransaction(): ", e); 182 } 183 } 184 185 192 public Object _putObject(Fqn fqn, Object obj) throws CacheException 193 { 194 checkObjectType(obj); 195 AOPInstance aopInstance = (AOPInstance) peek(fqn, AOPInstance.KEY); 196 boolean isSameClass = false; 198 Object oldValue = null; 199 if(log.isDebugEnabled()) { 201 log.debug("putObject(): fqn: " + fqn); 202 } 203 204 if (aopInstance != null) { 205 if (aopInstance.get() == obj) { 206 return obj; 208 } 209 210 if (obj == null) { 211 return removeObject(fqn); 212 } 213 214 log.debug("putObject(): old class type: " + aopInstance.get()); 217 if (obj.getClass().isInstance(aopInstance.get())) { 218 if (log.isDebugEnabled()) { 219 log.debug("putObject(): obj is same class type as the old one"); 220 } 221 oldValue = getObject(fqn); 222 isSameClass = true; 223 } else { 224 oldValue = removeObject(fqn); 225 } 226 } else { 227 Class claz1 = (Class ) peek(fqn, CLASS_INTERNAL); 229 if (claz1 != null && 230 obj.getClass().getName().equals(claz1.getName())) { 231 if (log.isDebugEnabled()) { 232 log.debug("putObject(): obj is same class type as the old one"); 233 } 234 isSameClass = true; 235 } 236 } 237 238 239 if (obj == null) { return null; 241 } 242 243 if (obj instanceof Advised) { 245 CachedType type = getCachedType(obj.getClass()); 246 249 Fqn internalFqn = null; 250 InstanceAdvisor advisor = ((Advised) obj)._getInstanceAdvisor(); 252 if ((internalFqn = checkCircularReference(fqn, advisor, obj)) != null) { 254 removeObject(fqn); 256 aopInstance = new AOPInstance(); 257 aopInstance.setRefFqn(internalFqn.toString()); 258 put(fqn, AOPInstance.KEY, aopInstance); 259 put(fqn, CLASS_INTERNAL, type.getType()); 260 return oldValue; 261 } else if ((internalFqn = handleObjectGraph(fqn, advisor, type, obj)) != null) { if (log.isDebugEnabled()) { 264 log.debug("putObject(): detected multiple references. Will use as a reference instead. Current fqn: " 265 + fqn + " Reference fqn: " + internalFqn); 266 } 267 removeObject(fqn); 269 aopInstance = new AOPInstance(); 270 setRefFqn(aopInstance, internalFqn.toString()); 271 put(fqn, AOPInstance.KEY, aopInstance); 272 put(fqn, CLASS_INTERNAL, type.getType()); 273 return oldValue; 274 } 275 276 if (advisor == null) { 278 advisor = new ClassInstanceAdvisor(obj); 279 ((Advised) obj)._setInstanceAdvisor(advisor); 280 } 281 282 advisor.appendInterceptor(new CacheInterceptor(this, fqn, type)); 284 285 put(fqn, CLASS_INTERNAL, type.getType()); 288 for (Iterator i = type.getFields().iterator(); i.hasNext();) { 289 Field field = (Field ) i.next(); 290 Object value = null; 291 try { 292 value=field.get(obj); 293 } 294 catch(IllegalAccessException e) { 295 throw new CacheException("field access failed", e); 296 } 297 CachedType fieldType = getCachedType(field.getType()); 298 if (fieldType.isImmediate()) { 299 put(fqn, field.getName(), value); 300 } else { 301 Fqn tmpFqn = new Fqn(fqn, field.getName()); 302 _putObject(tmpFqn, value); 303 if( value instanceof Map || value instanceof List || value instanceof Set ) { 308 Object newValue = getObject(tmpFqn); 309 try { 310 field.set(obj, newValue); 311 } catch (IllegalAccessException e) { 312 log.error("_putObject(): Can't swap out the Collection class of field " +field.getName() + 313 "Exception " +e); 314 throw new CacheException("_putObject(): Can't swap out the Collection class of field \" +field.getName()," 315 +e); 316 } 317 } 318 } 319 } 320 put(fqn, AOPInstance.KEY, new AOPInstance(obj)); 322 323 324 327 if (log.isDebugEnabled()) { 329 log.debug("putObject(): inserting with fqn: " + fqn.toString()); 330 } 331 332 337 } else if (obj instanceof Map) { 338 if (log.isDebugEnabled()) { 339 log.debug("putObject(): aspectized obj is a Map type of size: " + ((Map) obj).size()); 340 } 341 342 removeObject(fqn); 344 put(fqn, CLASS_INTERNAL, obj.getClass()); 345 346 Object oldObj = obj; 348 if( !(obj instanceof ClassProxy)) { 349 Class clazz = obj.getClass(); 350 try { 351 obj=CollectionInterceptorUtil.createProxy(clazz, new CachedMapInterceptor(this, fqn, clazz)); 352 } catch (Exception e) { 353 throw new CacheException("failure creating proxy", e); 354 } 355 } 356 357 Map map = (Map) oldObj; 358 359 for (Iterator i = map.entrySet().iterator(); i.hasNext();) { 360 Map.Entry entry = (Map.Entry) i.next(); 361 _putObject(new Fqn(fqn, entry.getKey()), entry.getValue()); 362 } 363 364 put(fqn, AOPInstance.KEY, new AOPInstance(obj)); 365 } else if (obj instanceof List) { 366 if (log.isDebugEnabled()) { 367 log.debug("putObject(): aspectized obj is a List type of size: " 368 + ((List) obj).size()); 369 } 370 371 List list = (List) obj; 372 removeObject(fqn); 374 put(fqn, CLASS_INTERNAL, obj.getClass()); 375 376 if( !(obj instanceof ClassProxy)) { 378 Class clazz = obj.getClass(); 379 try { 380 obj=CollectionInterceptorUtil.createProxy(clazz, new CachedListInterceptor(this, fqn, clazz)); 381 } catch (Exception e) { 382 throw new CacheException("failure creating proxy", e); 383 } 384 } 385 386 int idx = 0; 387 for (Iterator i = list.iterator(); i.hasNext();) { 388 _putObject(new Fqn(fqn, new Integer (idx++)), i.next()); 389 } 390 392 put(fqn, AOPInstance.KEY, new AOPInstance(obj)); 393 } else if (obj instanceof Set) { 394 if (log.isDebugEnabled()) { 395 log.debug("putObject(): aspectized obj is a Set type of size: " 396 + ((Set) obj).size()); 397 } 398 399 Set set = (Set) obj; 400 removeObject(fqn); 402 put(fqn, CLASS_INTERNAL, obj.getClass()); 403 404 if( !(obj instanceof ClassProxy)) { 406 Class clazz = obj.getClass(); 407 try { 408 obj=CollectionInterceptorUtil.createProxy(clazz, new CachedSetInterceptor(this, fqn, clazz)); 409 } catch (Exception e) { 410 throw new CacheException("failure creating proxy", e); 411 } 412 } 413 414 int idx = 0; 415 for (Iterator i = set.iterator(); i.hasNext();) { 416 _putObject(new Fqn(fqn, new Integer (idx++)), i.next()); 417 } 418 420 put(fqn, AOPInstance.KEY, new AOPInstance(obj)); 421 } else if (obj instanceof Serializable ) { if (log.isDebugEnabled()) { 423 log.debug("putObject(): obj (" + obj.getClass() + ") is non-advisable but is Serializable. "); 424 } 425 426 if (!isSameClass) 427 put(fqn, CLASS_INTERNAL, obj.getClass()); 428 429 put(fqn, AOPInstance.KEY, new AOPInstance(obj)); 430 put(fqn, "value", obj); 431 } 432 433 return oldValue; 434 } 435 436 442 protected void checkObjectType(Object obj) { 443 if(obj == null) return; 444 if( ! (obj instanceof Advised) ) { 445 if( !(obj instanceof Serializable ) ) { 446 throw new IllegalArgumentException ("TreeCacheAop.putObject(): Object type is neither " + 447 " aspectized nor Serializable. Object class name is " +obj.getClass().getName()); 448 } 449 } 450 } 451 452 protected Fqn checkCircularReference(Fqn fqn, InstanceAdvisor advisor, Object obj) 453 { 454 if (advisor == null) return null; 456 Fqn originalFqn = null; 457 org.jboss.aop.advice.Interceptor interceptor = findCacheInterceptor(advisor); 459 if (interceptor == null) { 460 return null; 461 } 462 463 originalFqn = ((CacheInterceptor) interceptor).getFqn(); 465 466 if (fqn.isChildOf(originalFqn)) { 469 if (log.isDebugEnabled()) { 470 log.debug("checkCircularReference(): is child for circular ref fqn " + originalFqn); 471 } 472 return originalFqn; 473 } 474 return null; 475 } 476 477 488 protected Fqn handleObjectGraph(Fqn fqn, InstanceAdvisor advisor, CachedType type, Object obj) throws CacheException { 489 if (advisor == null) return null; 491 Fqn originalFqn = null; 492 Fqn internalFqn = null; 493 org.jboss.aop.advice.Interceptor interceptor = findCacheInterceptor(advisor); 495 if (interceptor == null) { 496 if (log.isDebugEnabled()) { 497 log.debug("handleMultipleReference(): No multiple refernce found for fqn: " + fqn); 498 } 499 return null; 501 } 502 503 originalFqn = ((CacheInterceptor) interceptor).getFqn(); 505 if( fqn.equals(originalFqn) ) return null; 508 509 if (log.isDebugEnabled()) { 510 log.debug("handleObjectGraph(): Found multiple refernce at original fqn: " + originalFqn); 511 } 512 513 if (originalFqn.isChildOf(JBOSS_INTERNAL)) { 517 if (log.isDebugEnabled()) { 518 log.debug("handleObjectGraph(): is child for fqn " + originalFqn); 519 } 520 return originalFqn; 521 } else { 522 internalFqn = createInternalNode(originalFqn); 524 Object oldValue = removeObject(originalFqn); 526 putObject(internalFqn, obj); 528 AOPInstance instance = new AOPInstance(); 530 setRefFqn(instance, internalFqn.toString()); 531 put(originalFqn, AOPInstance.KEY, instance); put(originalFqn, CLASS_INTERNAL, type.getType()); 533 if (log.isDebugEnabled()) { 534 log.debug("handleObjectGraph(): relocate the original fqn: " + originalFqn + 535 " to JBossInternal: " + internalFqn + " with obj: " + oldValue); 536 } 538 return internalFqn; 540 } 541 } 542 543 549 protected Interceptor findCacheInterceptor(InstanceAdvisor advisor, Fqn fqn) 550 { 551 org.jboss.aop.advice.Interceptor[] interceptors = advisor.getInterceptors(); 552 for (int i = 0; i < interceptors.length; i++) { 554 Interceptor interceptor = interceptors[i]; 555 if (interceptor instanceof CacheInterceptor) { 556 CacheInterceptor inter = (CacheInterceptor)interceptor; 557 if (inter != null && inter.getFqn().equals(fqn)) 558 { 559 return interceptor; 560 } 561 } 562 } 563 return null; 564 } 565 566 573 protected Interceptor findCacheInterceptor(InstanceAdvisor advisor) 574 { 575 org.jboss.aop.advice.Interceptor[] interceptors = advisor.getInterceptors(); 576 for (int i = 0; i < interceptors.length; i++) { 578 Interceptor interceptor = interceptors[i]; 579 if (interceptor instanceof CacheInterceptor) { 580 return interceptor; 581 } 582 } 583 return null; 584 } 585 586 protected Fqn createInternalNode(Fqn storedFqn) 588 { 589 Fqn fqn = new Fqn(JBOSS_INTERNAL, storedFqn); 590 return fqn; 591 } 592 593 601 public Object getObject(String fqn) throws CacheException 602 { 603 return getObject(Fqn.fromString(fqn)); 604 } 605 606 protected boolean hasCurrentTransaction() 607 { 608 try { 609 if(getCurrentTransaction() != null || localTm_.getTransaction() != null) 610 { 611 return true; 613 } 614 } catch (SystemException e) { 615 e.printStackTrace(); 616 } 617 return false; 618 } 619 620 628 public Object getObject(Fqn fqn) throws CacheException 629 { 630 if( hasCurrentTransaction() ) { 632 Object obj = _getObject(fqn); 633 return obj; 634 } else 635 { 636 try 639 { 640 localTm_.begin(); 641 put(fqn, DUMMY, DUMMY); 643 Object obj = _getObject(fqn); 644 remove(fqn, DUMMY); 645 return obj; 646 } 647 catch (Exception e) 648 { 649 e.printStackTrace(); 650 try 651 { 652 localTm_.setRollbackOnly(); 653 } 654 catch (Exception exn) 655 { 656 exn.printStackTrace(); 657 } 658 throw new NestedRuntimeException("TreeCacheAop.getObject(): ", e); 660 } 661 finally 662 { 663 endTransaction(); 664 } 665 666 } 667 } 668 669 private Object _getObject(Fqn fqn) throws CacheException 670 { 671 AOPInstance aopInstance = (AOPInstance) peek(fqn, AOPInstance.KEY); 672 673 if (aopInstance != null && aopInstance.get() != null) { 674 return aopInstance.get(); 676 } 677 678 Class clazz = (Class ) peek(fqn, CLASS_INTERNAL); 680 if (clazz == null || aopInstance == null) 682 return null; 683 684 CachedType type = getCachedType(clazz); 685 Object obj = null; 686 if (Advised.class.isAssignableFrom(clazz)) { 687 String refFqn = aopInstance.getRefFqn(); 688 if (refFqn == null) { try { 690 obj = clazz.newInstance(); 691 } 692 catch(Exception e) { 693 throw new CacheException("failed creating instance of " + clazz.getName(), e); 694 } 695 InstanceAdvisor advisor = ((Advised) obj)._getInstanceAdvisor(); 697 advisor.appendInterceptor(new CacheInterceptor(this, fqn, type)); 698 } else { 699 if (log.isDebugEnabled()) { 703 log.debug("getObject(): obtain value from reference fqn: " + refFqn); 704 } 705 obj = getObject(refFqn); 706 } 707 708 } else { try { 710 if(Map.class.isAssignableFrom(clazz)) { 711 obj=CollectionInterceptorUtil.createProxy(clazz, new CachedMapInterceptor(this, fqn, clazz)); 712 } else if(List.class.isAssignableFrom(clazz)) { 713 obj=CollectionInterceptorUtil.createProxy(clazz, new CachedListInterceptor(this, fqn, clazz)); 714 } else if(Set.class.isAssignableFrom(clazz)) { 715 obj=CollectionInterceptorUtil.createProxy(clazz, new CachedSetInterceptor(this, fqn, clazz)); 716 } else { 717 obj=peek(fqn, "value"); 719 } 720 } 721 catch(Exception e) { 722 throw new CacheException("failure creating proxy", e); 723 } 724 } 725 726 if (aopInstance == null) { 727 throw new RuntimeException ("getObject(): aopInstance is null"); 729 } 730 aopInstance.set(obj); 731 return obj; 732 } 733 734 742 public Object removeObject(String fqn) throws CacheException 743 { 744 return removeObject(Fqn.fromString(fqn)); 745 } 746 747 755 public Object removeObject(Fqn fqn) throws CacheException 756 { 757 if( hasCurrentTransaction() ) { 759 return _removeObject(fqn, true); 760 } else 761 { 762 try 764 { 765 localTm_.begin(); 766 put(fqn, DUMMY, DUMMY); 768 Object obj = _removeObject(fqn, true); 769 remove(fqn, DUMMY); 770 return obj; 771 } 772 catch (Exception e) 773 { 774 e.printStackTrace(); 775 try 776 { 777 localTm_.setRollbackOnly(); 778 } 779 catch (Exception exn) 780 { 781 exn.printStackTrace(); 782 } 783 throw new NestedRuntimeException("TreeCacheAop.removeObject(): ", e); 785 } 786 finally 787 { 788 endTransaction(); 789 } 790 } 791 } 792 793 protected Object _removeObject(Fqn fqn, boolean removeCacheInterceptor) throws CacheException 794 { 795 if (log.isDebugEnabled()) { 796 log.debug("removeObject(): removing object from fqn: " + fqn); 797 } 798 799 Class clazz = (Class ) peek(fqn, CLASS_INTERNAL); 800 if (clazz == null) 803 { 804 if (log.isTraceEnabled()) { 805 log.trace("removeObject(): clasz is null. fqn: " + fqn); 806 } 807 return null; 808 } 809 810 Object result = getObject(fqn); 811 AOPInstance aopInstance = (AOPInstance) peek(fqn, AOPInstance.KEY); 812 if (Advised.class.isAssignableFrom(clazz)) { 813 String refFqn = aopInstance.getRefFqn(); 814 InstanceAdvisor advisor = ((Advised) result)._getInstanceAdvisor(); 815 if (refFqn != null) { 817 if (log.isDebugEnabled()) { 818 log.debug("removeObject(): removing object fqn: " + fqn + " but is actually from ref fqn: " + refFqn); 819 } 820 removeRefFqn(aopInstance, refFqn, removeCacheInterceptor); 821 } else { 822 CachedType type = getCachedType(clazz); 823 for (Iterator i = type.getFields().iterator(); i.hasNext();) { 824 Field field = (Field ) i.next(); 825 CachedType fieldType = getCachedType(field.getType()); 826 if (!fieldType.isImmediate()) { 827 Object obj = _removeObject(new Fqn(fqn, field.getName()), removeCacheInterceptor); 828 if (obj == null) continue; 829 } 830 } 831 if(removeCacheInterceptor) { 833 CacheInterceptor interceptor = (CacheInterceptor) findCacheInterceptor(advisor); 834 if (interceptor != null) 839 { 840 if (log.isDebugEnabled()) { 841 log.debug("removeObject(): removed cache interceptor fqn: " + fqn + " interceptor: "+interceptor); 842 } 843 advisor.removeInterceptor(interceptor.getName()); 844 } 845 } 846 } 847 } else if (Map.class.isAssignableFrom(clazz)) { 848 Map values = get(fqn).getChildren(); 849 if (values != null) { 850 ArrayList list = new ArrayList(values.keySet()); for (int i=0; i < list.size(); i++) { 852 Object key = list.get(i); 853 _removeObject(new Fqn(fqn, key), removeCacheInterceptor); 854 } 855 } 856 } else if (Collection.class.isAssignableFrom(clazz)) { 857 Map values = get(fqn).getChildren(); 858 int size = values == null ? 0 : values.size(); 859 for (int i = 0; i < size; i++) { 860 _removeObject(new Fqn(fqn, new Integer (i)), removeCacheInterceptor); 861 } 862 } 863 864 remove(fqn); 866 return result; 868 } 869 870 871 878 public synchronized CachedType getCachedType(Class clazz) 879 { 880 CachedType type = (CachedType) cachedTypes.get(clazz); 881 if (type == null) { 882 type = new CachedType(clazz); 883 cachedTypes.put(clazz, type); 884 } 885 return type; 886 } 887 888 void setRefFqn(AOPInstance instance, String refFqn) throws CacheException { 889 AOPInstance refInstance = (AOPInstance) peek(Fqn.fromString(refFqn), AOPInstance.KEY); 890 synchronized (this) { 891 refInstance.incrementRefCount(); 892 put(refFqn, AOPInstance.KEY, refInstance); 894 } 895 instance.setRefFqn(refFqn); 896 } 897 898 void removeRefFqn(AOPInstance instance, String refFqn, boolean removeCacheInterceptor) throws CacheException { 899 AOPInstance refInstance = (AOPInstance) peek(Fqn.fromString(refFqn), AOPInstance.KEY); 900 synchronized (this) { 903 if (refInstance.decrementRefCount() == 0) { 904 _removeObject(Fqn.fromString(refFqn), removeCacheInterceptor); 905 } else { 906 put(refFqn, AOPInstance.KEY, refInstance); 908 } 909 } 910 911 instance.removeRefFqn(); 912 } 913 914 917 public Object _put(GlobalTransaction tx, Fqn fqn, Object key, Object value, 918 boolean create_undo_ops) throws CacheException 919 { 920 Object result = super._put(tx, fqn, key, value, create_undo_ops); 921 if (key == AOPInstance.KEY) 923 return result; 924 925 AOPInstance aopInstance = (AOPInstance) _get(fqn, AOPInstance.KEY, false); 926 Object instance = null; 927 if (aopInstance == null || (instance = aopInstance.get()) == null) { 928 return result; 929 } 930 931 CachedType type = getCachedType((Class ) _get(fqn, CLASS_INTERNAL, false)); 933 934 if(type.isImmediate()) return result; 935 936 Field f = type.getField((String ) key); 937 if(f == null) return result; 939 try { 940 f.set(instance, value); 941 } catch (Exception e) { 942 throw new NestedRuntimeException(e); 943 } 944 945 return result; 946 } 947 948 958 public void evict(Fqn fqn) throws CacheException { 959 if(isAopNode(fqn)) { 962 if(log.isDebugEnabled()) { 963 log.debug("evict(): evicting whole aop node " +fqn); 964 } 965 boolean removeCacheInterceptor = false; 971 _removeObject(fqn, removeCacheInterceptor); 972 } else { 973 super.evict(fqn); 974 } 975 } 976 977 private boolean isAopNode(Fqn fqn) 978 { 979 try { 980 return (peek(fqn, AOPInstance.KEY) != null) ? true: false; 981 } catch (Exception e) { 982 log.warn("isAopNode(): cache get operation generated exception " +e); 983 return false; 984 } 985 } 986 } 987 | Popular Tags |