geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject cvs commit: incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/service GeronimoOperationInfo.java
Date Fri, 14 Nov 2003 16:16:52 GMT
djencks     2003/11/14 08:16:52

  Modified:    modules/kernel/src/java/org/apache/geronimo/kernel/service
                        GeronimoOperationInfo.java
  Log:
  More constructors, and change default caching level to 'never cache' from 'cache forever'
  
  Revision  Changes    Path
  1.4       +16 -9     incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/service/GeronimoOperationInfo.java
  
  Index: GeronimoOperationInfo.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/service/GeronimoOperationInfo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- GeronimoOperationInfo.java	6 Nov 2003 19:59:15 -0000	1.3
  +++ GeronimoOperationInfo.java	14 Nov 2003 16:16:52 -0000	1.4
  @@ -59,6 +59,9 @@
   import java.util.Collections;
   import java.util.LinkedList;
   import java.util.List;
  +import java.util.Arrays;
  +import java.util.ArrayList;
  +
   import javax.management.MBeanOperationInfo;
   import javax.management.MBeanParameterInfo;
   
  @@ -89,7 +92,7 @@
       /**
        * Parameters of this method.
        */
  -    private final List parameters = new LinkedList();
  +    private final List parameters;
   
       /**
        * Parameter types of this operation.
  @@ -125,7 +128,7 @@
       /**
        * The maximum ammount ot time in seconds that a cached value is valid.
        */
  -    long cacheTimeLimit;
  +    long cacheTimeLimit = -1L;
   
       //
       // Runtime information -- this is not exposed to clients
  @@ -153,17 +156,20 @@
       private final int hashCode = System.identityHashCode(this);
   
       public GeronimoOperationInfo() {
  -        super("Ignore", null, null, "Ignore", MBeanOperationInfo.UNKNOWN);
  -        immutable = false;
  -        method = null;
  -        returnType = null;
  -        parameterTypes = null;
  +        this(null, new GeronimoParameterInfo[] {}, 0, null);
       }
   
       public GeronimoOperationInfo(String name) {
  +        this(name, new GeronimoParameterInfo[] {}, 0, null);
  +    }
  +
  +    public GeronimoOperationInfo(String name, GeronimoParameterInfo[] parameterInfo, int
impact, String description) {
           super("Ignore", null, null, "Ignore", MBeanOperationInfo.UNKNOWN);
  -        this.name = name;
           immutable = false;
  +        this.name = name;
  +        parameters = new ArrayList(Arrays.asList(parameterInfo));
  +        this.impact = impact;
  +        this.description = description;
           method = null;
           returnType = null;
           parameterTypes = null;
  @@ -209,6 +215,7 @@
               targetMethodName = source.targetMethodName;
           }
   
  +        parameters = new ArrayList(source.parameters.size());
           parameterTypes = new String[source.parameters.size()];
           Class[] types = new Class[source.parameters.size()];
           for (int i = 0; i < source.parameters.size(); i++) {
  
  
  

Mime
View raw message