1 5 package com.tc.object.config; 6 7 import com.tc.asm.ClassAdapter; 8 import com.tc.asm.ClassVisitor; 9 import com.tc.asm.ClassWriter; 10 import com.tc.aspectwerkz.reflect.ClassInfo; 11 import com.tc.aspectwerkz.reflect.MemberInfo; 12 import com.tc.config.schema.NewCommonL1Config; 13 import com.tc.object.Portability; 14 import com.tc.object.bytecode.ClassAdapterFactory; 15 import com.tc.object.bytecode.TransparencyClassAdapter; 16 import com.tc.object.config.schema.DSOInstrumentationLoggingOptions; 17 import com.tc.object.config.schema.DSORuntimeLoggingOptions; 18 import com.tc.object.config.schema.DSORuntimeOutputOptions; 19 import com.tc.object.config.schema.InstrumentedClass; 20 import com.tc.object.logging.InstrumentationLogger; 21 import com.terracottatech.config.Modules; 22 23 import java.util.Collection ; 24 import java.util.Iterator ; 25 import java.util.Map ; 26 27 32 public interface DSOClientConfigHelper extends DSOApplicationConfig { 33 34 boolean shouldBeAdapted(ClassInfo classInfo); 35 36 boolean isNeverAdaptable(ClassInfo classInfo); 37 38 boolean isLogical(String theClass); 39 40 DSOInstrumentationLoggingOptions getInstrumentationLoggingOptions(); 41 42 void verifyBootJarContents() throws IncompleteBootJarException, UnverifiedBootJarException; 43 44 TransparencyClassSpec[] getAllSpecs(); 45 46 Iterator getAllUserDefinedBootSpecs(); 47 48 TransparencyClassAdapter createDsoClassAdapterFor(ClassVisitor writer, ClassInfo classInfo, 49 InstrumentationLogger lgr, ClassLoader caller, 50 final boolean forcePortable); 51 52 ClassAdapter createClassAdapterFor(ClassWriter writer, ClassInfo classInfo, InstrumentationLogger lgr, 53 ClassLoader caller); 54 55 ClassAdapter createClassAdapterFor(ClassWriter writer, ClassInfo classInfo, InstrumentationLogger lgr, 56 ClassLoader caller, boolean disableSuperClassTypeChecking); 57 58 boolean isCallConstructorOnLoad(String className); 59 60 Class getChangeApplicator(Class clazz); 62 63 boolean isPortableModuleClass(Class clazz); 64 65 void setModuleSpecs(ModuleSpec[] pluginSpecs); 66 67 TransparencyClassSpec getOrCreateSpec(String className); 68 69 TransparencyClassSpec getOrCreateSpec(String className, String applicator); 70 71 LockDefinition[] lockDefinitionsFor(int access, String className, String methodName, String description, 72 String [] exceptions); 73 74 boolean isRoot(String className, String fieldName); 75 76 boolean isRootDSOFinal(String className, String fieldName, boolean isPrimitive); 77 78 boolean isTransient(int modifiers, String classname, String field); 79 80 boolean isVolatile(int modifiers, String classname, String field); 81 82 String rootNameFor(String className, String fieldName); 83 84 boolean isLockMethod(int access, String className, String methodName, String description, String [] exceptions); 85 86 DistributedMethodSpec getDmiSpec(int modifiers, String className, String methodName, String description, 87 String [] exceptions); 88 89 TransparencyClassSpec getSpec(String className); 90 91 boolean isDSOSessions(String name); 92 93 DSORuntimeLoggingOptions runtimeLoggingOptions(); 94 95 DSORuntimeOutputOptions runtimeOutputOptions(); 96 97 DSOInstrumentationLoggingOptions instrumentationLoggingOptions(); 98 99 int getFaultCount(); 100 101 void addWriteAutolock(String methodPattern); 102 103 void addSynchronousWriteAutolock(String methodPattern); 104 105 void addLock(String methodPattern, LockDefinition lockDefinition); 106 107 void addReadAutolock(String methodPattern); 108 109 void addAutolock(String methodPattern, ConfigLockLevel type); 110 111 void setFaultCount(int count); 112 113 void addRoot(String className, String fieldName, String rootName, boolean addSpecForClass); 114 115 void addRoot(String className, String fieldName, String rootName, boolean dsoFinal, boolean addSpecForClass); 116 117 boolean matches(final Lock lock, final MemberInfo methodInfo); 118 119 boolean matches(final String expression, final MemberInfo methodInfo); 120 121 void addTransient(String className, String fieldName); 122 123 void addTransientType(String className, String fieldName); 124 125 String getOnLoadScriptIfDefined(String className); 126 127 String getPostCreateMethodIfDefined(String className); 128 129 String getOnLoadMethodIfDefined(String className); 130 131 boolean isUseNonDefaultConstructor(Class clazz); 132 133 void addIncludePattern(String expression); 134 135 NewCommonL1Config getNewCommonL1Config(); 136 137 void addIncludePattern(String expression, boolean honorTransient); 139 140 void addIncludePattern(String expression, boolean honorTransient, boolean oldStyleCallConstructorOnLoad, 141 boolean honorVolatile); 142 143 void addIncludeAndLockIfRequired(String expression, boolean honorTransient, boolean oldStyleCallConstructorOnLoad, 145 boolean honorVolatile, String lockExpression); 146 147 void addExcludePattern(String expression); 149 150 boolean hasIncludeExcludePatterns(); 151 152 boolean hasIncludeExcludePattern(ClassInfo classInfo); 153 154 void addAspectModule(String pattern, String moduleName); 155 156 Map getAspectModules(); 157 158 void addDSOSpringConfig(DSOSpringConfigHelper config); 159 160 Collection getDSOSpringConfigs(); 161 162 void addDistributedMethodCall(DistributedMethodSpec dms); 163 164 Portability getPortability(); 165 166 void removeSpec(String className); 167 168 String getLogicalExtendingClassName(String className); 169 170 void addUserDefinedBootSpec(String className, TransparencyClassSpec spec); 171 172 void addApplicationName(String name); 173 174 void addSynchronousWriteApplication(String name); 175 176 void addInstrumentationDescriptor(InstrumentedClass classDesc); 177 178 Modules getModulesForInitialization(); 179 180 void addNewModule(String name, String version); 181 182 boolean hasCustomAdapter(String fullName); 183 184 void addCustomAdapter(String name, ClassAdapterFactory adapterFactory); 185 186 int getSessionLockType(String appName); 187 188 Class getTCPeerClass(Class clazz); 189 190 } 191 | Popular Tags |