zoukankan      html  css  js  c++  java
  • no-proxy 和proxy 的区别

    Child   <-   many-to-one   ->Parent   
        
      class   Child   {   
          private   Parent   parent;   
        
          public   Parent   getParent   (){   
              return   this.parent;//访问了实例变量   
          }   
            
      }   
        
      class   Parent   {   
          private   String   name;   
        
          public   String   getName(){   
              return   this.name;//访问了实例变量   
          }   
        
          public   void   f(){   
              System.out.println("invokeing   f()");//没有访问实例变量   
          }   
      }   
        
      如果   many-to-one   的lazy设为proxy,当child.getParent().getName()或child.getParent().f()时,parent都会被抓取,若设为no-proxy,调用child.getParent().f()时,parent是不会被抓取的,同时这种方式需要编译时字节码增强,否则和proxy没区别。

  • 相关阅读:
    Z算法
    CodeForces 939F
    CodeForces 15D
    ZOJ 3408
    CodeForces 962D
    CodeForces 29D
    CodeForces 1129C
    RabbitMQ.NET In Window Service
    封装RabbitMQ.NET Library 的一点经验总结 转载
    DotNetBar 使用笔记
  • 原文地址:https://www.cnblogs.com/myhome-1/p/5840739.html
Copyright © 2011-2022 走看看