input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public void print stack trace final print writer writer if get caused by exception null nested throwable parent trace enabled super print stack trace writer nested throwable util print get caused by exception writer | prints the composite message and the embedded stack trace to the |
public transaction manager get transaction manager return tm | mbean get set pair for field transaction manager |
public transaction suspend throws system exception thread info ti get thread info transaction impl current ti tx if current null ti tx null if trace log trace suspended tx current if current is done current null return current | suspend the transaction currently associated with the current |
public long get transaction count return tm get transaction count | counts the number of transactions |
public long get commit count return tm get commit count | the number of commits |
public long get rollback count return tm get rollback count | the number of rollbacks |
public void register xaexception formatter class clazz xaexception formatter formatter xa exception formatters put clazz formatter | the code register xaexception formatter code method |
public void unregister xaexception formatter class clazz xa exception formatters remove clazz | the code unregister xaexception formatter code method |
public void set default transaction timeout int seconds time out 1000 l seconds if trace log trace default tx timeout is now seconds s | set the default transaction timeout for new transactions |
public int get default transaction timeout return int time out 1000 | get the default transaction timeout |
public transaction disassociate thread return disassociate thread get thread info | the following 2 methods are here to provide association and |
public string to string return bad string operation op | returns a string representing the error |
public transaction import transaction propagation context object tpc if tpc instanceof global id global id id global id tpc return transaction global id tx get id log warn cannot import transaction propagation context tpc return null | import a transaction propagation context into this tm |
public object get transaction propagation context return get transaction propagation context get thread info tx | return a tpc for the current transaction |
public boolean is integer object value get value return value instanceof integer value instanceof long | test whether the type is integer |
public object get transaction propagation context transaction tx if no transaction or unknown transaction class return null if tx null return null if tx instanceof transaction impl log warn cannot export transaction propagation context tx return null return transaction impl tx get global id | return a tpc for the argument transaction |
public double get long value return number get value long value | get the value of this number integers |
public int get transaction count return global id tx size | return the number of active transactions |
public string to string return invalid application val to string | get a string represention of the exception |
public long get commit count return commit count | a count of the transactions that have been committed |
public long get rollback count return rollback count | a count of the transactions that have been rolled back |
public string get string return val | get the value of the string |
private thread info get thread info thread info ret thread info thread tx get if ret null ret new thread info ret timeout time out thread tx set ret return ret | return the thread info for the calling thread and create if not |
public void add attribute object super add object | append an attribute to the list |
public void add int index attribute object super add index object | insert a new attribute into the list at the specified location |
public int get impact if impact action impact info impact action info impact unknown throw new jmruntime exception invalid impact value impact the impact must be either action info action info or unknown return impact | returns the impact of this operation |
public void set int index attribute object super set index object | change the attribute at the specified location |
public string to string return runtime error exception get message error null n cause error to string | returns a string representation of this exception |
public boolean add all int index attribute list list return super add all index list | insert all the attributes in the passed list at the specified |
public boolean equals object object if object instanceof attribute return false attribute attr attribute object return name equals attr get name value equals attr get value | compares two attributes for equality |
public runtime exception get target exception return runtime exception | retrieves the wrapped runtime exception |
public string to string return runtime operations exception get message runtime exception null n cause runtime exception to string | returns a string representation of this exception |
public object get source return my source | retrieve the source of the notification |
public list get index names return collections unmodifiable list index names | retrieve an unmodifiable list of index names in the same order as |
public open type get element open type return element type | get the open type of the array elements |
public boolean is value object obj if obj null obj instanceof tabular data return false tabular type other tabular data obj get tabular type return equals other | determines whether the object is a value of the this tabular type |
private boolean recursive check object elements int dimension reached the end if dimension 1 check each element is the correct type for int i 0 i elements length i if elements i null element type is value elements i false return false else check the array element in this array element for int i 0 i elements length i if recursive check object elements i dimension 1 false return false return true | recursively check array elements |
public boolean contains key string item name if item name null item name length 0 return false return name to description contains key item name | determine whether this composite type contains the item name |
public string to string return reflection exception get message exception null n cause exception to string | returns a string representation of this exception |
public string get description string item name return string name to description get item name | retrieve the description for an item name |
public open type get type string item name return open type name to type get item name | retrieve the open type for an item name |
public string to string return bad binary operation value expression exp to string | returns a string representing the error |
public set key set return collections unmodifiable set name to description key set | retrieve an unmodifiable set view of all the item names in |
public boolean is value object obj if obj null obj instanceof composite data return false return equals composite data obj get composite type | determines whether the object is a value of the this composite type |
public void set descriptors descriptor in descriptors throws mbean exception for int i 0 i in descriptors length i if in descriptors i null in descriptors i is valid set descriptor in descriptors i string in descriptors i get field value model mbean constants descriptor type | adds or replaces the descriptors in this model mbean |
public descriptor get descriptor return descriptor descriptor clone | returns a copy of the descriptor associated with this operation |
public void set descriptor descriptor in descriptor if in descriptor null in descriptor create default descriptor if in descriptor is valid fixme give more detailed error throw new illegal argument exception invalid descriptor this descriptor in descriptor | replaces the descriptor associated with this operation |
public string to string return model mbean operation info get return type get name get signature string impact get impact string descriptor get descriptor | returns a string representation of this model mbean operation info object |
public string to string return invalid target object type exception get message exception null n cause exception to string | returns a string representation of this exception |
public string to string return model mbean attribute info name get name type get type access is readable is writable rw is readable ro wo descriptor get descriptor | returns a string representation of this model mbean attribute info object |
public void do run send any notifications send notifications this | send the notifications |
private void init map data map tabular type tabular type if data map null throw new illegal argument exception null data map if tabular type null throw new illegal argument exception null tabular type this data map data map this tabular type tabular type list index name list tabular type get index names this index names string index name list to array new string index name list size | initialise the tabular data |
private void validate composite data composite data value if value null throw new null pointer exception null value if value get composite type equals tabular type get row type false throw new invalid open type exception value has composite type value get composite type expected row type tabular type get row type | validate the composite type against the row type |
private void validate key object key if key null key length 0 throw new null pointer exception null key if key length index names length throw new invalid key exception key has key length elements should be index names length for int i 0 i key length i open type open type tabular type get row type get type index names i if open type is value key i false throw new invalid key exception key element i key is not a value for open type | validate the key against the row type |
public object get trigger return trigger | retrieves the trigger value of the notification |
public list get role value return role value | retrieve the role value |
public void set role value list role value this role value new array list role value | set the role value it must be an array list |
public list get mbeans to unregister if unregister mbean list null return new array list else return new array list unregister mbean list | retrieves a list of object names of the mbeans that will be removed |
public void set roles role list role list this role list role list | set the successful roles |
public void set roles unresolved role unresolved list role unresolved list this unresolved role list role unresolved list | set the unsuccessful roles |
public void do run perform the monitoring monitor run monitor reschedule set next run system current time millis monitor granularity period | run the montior |
public list get role value return new array list object name list | retrieve the role value |
public list get new role value if new role value null return new array list else return new array list new role value | retrieves the new list of object names in the role |
public string to string string buffer buffer new string buffer role info for name buffer append name buffer append class name buffer append referenced mbean class name buffer append description buffer append description buffer append readable buffer append is readable buffer append writable buffer append is writable buffer append minimum degree buffer append min degree buffer append maximum degree buffer append max degree buffer append return buffer to string | retrieve a string description of the role info |
private void interrupt threads iterator it threads iterator while it has next thread thread thread it next try thread interrupt catch exception ignored threads clear | interrupt all threads involved with transaction |
public list get old role value if old role value null return new array list else return new array list old role value | retrieves the old list of object names in the role |
public void print stack trace final print stream stream super print stack trace stream if exception null stream println nested throwable exception print stack trace stream | prints the composite message and the embedded stack trace to the |
public string to string return mbean exception get message exception null n cause exception to string | returns a string representation of this exception |
public void enable attribute string name attributes add name | enables the attribute change notifications of the given attribute to be |
public void disable attribute string name attributes remove name | disable the attribute change notifications of the given attribute |
public void disable all attributes attributes clear | disables all attribute change notifications |
public vector get enabled attributes return new vector attributes | returns the names of the attributes whose notifications are allowed to |
public void set mbean server mbean server server this server set server | set the mbean server for this query |
private string get string status int status switch status case status status preparing return status preparing case status status prepared return status prepared case status status rolling back return status rolling back case status status rolledback return status rolledback case status status committing return status commiting case status status committed return status commited case status status no transaction return status no transaction case status status unknown return status unknown case status status marked rollback return status marked rollback case status status active return status active default return status unknown status | return a string representation of the given status code |
protected object get attribute object name name try return get mbean server get attribute name attr catch exception e review what happens now return null | get the value of the attribute for a given object name |
public string to string return runtime mbean exception get message runtime exception null n cause runtime exception to string | returns a string representation of this exception |
public string to string return bad attribute value expression val to string | returns a string representing the error |
private void init string name throws malformed object name exception if name null throw new malformed object name exception null name if name length 0 name int domain sep name index of if 1 domain sep throw new malformed object name exception missing domain init domain name substring 0 domain sep init properties name substring domain sep 1 | constructs an object name from a string |
private void init domain string dstring throws malformed object name exception if null dstring throw new malformed object name exception null domain if is illegal domain dstring throw new malformed object name exception domain contains illegal characters if dstring index of 1 dstring index of 1 this has pattern true this domain dstring | checks for domain patterns and illegal characters |
public void test torture one system err println n timer iterations performance suite timer iteration count system err println one notification at 1 millsecond intervals init test try init timer start timer target performance suite timer iteration count long start time offset 0 get time add notification 1000 1 performance suite timer iteration count sync sleep 1000 long end time offset 0 get time stop timer system err println time ms end start finally mbean server factory release mbean server server | see how long to do many notifications one notification |
public void test torture ten system err println n timer iterations performance suite timer iteration count system err println ten notifications at 1 millsecond intervals init test try init timer start timer target 10 performance suite timer iteration count long start time offset 0 get time for int i 0 i 10 i add notification 1000 1 performance suite timer iteration count sync sleep 1000 long end time offset 0 get time stop timer system err println time ms end start finally mbean server factory release mbean server server | see how long to many notifications one notification this tests the overhead |
private void init test notifications 0 server mbean server factory create mbean server | start a new test |
private void init timer try timer new timer timer name new object name test type timer server register mbean timer timer name server add notification listener timer name this null null catch exception e fail e to string | create a timer and register ourselves as a listener |
private void start timer timer start | start the timer |
private void stop timer timer stop | stop the timer does a small wait to avoid problems with the ri |
private void add notification long offset long period long occurs id timer add notification timer type message user data time offset offset period occurs | add a notification |
public void handle notification notification n object ignored notifications timer notification tn timer notification n if timer get nb occurences tn get notification id long value 1 synchronized timer name timer name notify all | handle the notification just add it to the list |
private void sync synchronized timer name try timer name wait 60000 catch interrupted exception ignored | sync with the notification handler |
private date time offset long offset return new date system current time millis offset | get the time using and offset |
private boolean is illegal domain string dom char chars dom to char array for int i 0 i chars length i switch chars i case case case return true return false | returns true if the domain contains illegal characters |
private void sleep long time try thread current thread sleep time catch interrupted exception ignored | sleep for a bit |
private void init test notifications clear server mbean server factory create mbean server | start a new test |
private void cancel timeout if timeout null unlock try timeout cancel catch exception e if trace log trace failed to cancel timeout e finally lock timeout null | cancel the timeout |
private void stop timer sleep timer stop | stop the timer does a small wait to avoid problems with the ri |
private void add notification long offset id timer add notification timer type message user data time offset timer suite zero time | add a notification |
public void handle notification notification n object ignored notifications add n synchronized notifications notifications notify all | handle the notification just add it to the list |
private void sync synchronized notifications try notifications wait timer suite max wait catch interrupted exception ignored | sync with the notification handler |
private void sleep sleep timer suite zero time | sleep for the default time |
private void stop timer service try server invoke timer name remove all notifications new object 0 new string 0 server invoke timer name stop new object 0 new string 0 server unregister mbean timer name mbean server factory release mbean server server catch exception ignored | remove everything used by this test |
public void handle notification notification notification object handback synchronized received notifications received notifications add notification received notifications notify all | handle a notification just add it to the list |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.