input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public void snapshot string id try clustered session session clustered session manager find session id synchronized sessions sessions put id session catch exception e log error could not distribute session e | store the modified session in a hashmap for the distributor thread |
public void snapshot string id try find the session that has been modified clustered session session clustered session manager find session id if economic snapshotting first look at the session is it modified if session is modified manager store session session else manager store session session session set modified false catch exception e log error could not distribute session e | instant replication of the modified session |
protected void process sessions hash map work log debug processing modified sessions synchronized sessions make a copy of the hash map to release the lock quickly work hash map sessions clone sessions clear iterator iter work values iterator distribute all modified sessions while iter has next clustered session session clustered session iter next if economic snapshotting if session is modified manager store session session else manager store session session session set modified false log trace session with id session get id processed | distribute all modified sessions |
protected void store session clustered session session if session null return if session is valid notify all session attributes that they get serialized srv 7 7 2 session passivate if log is debug enabled log debug replicating session with id session get id proxy set http session session get id serializable http session session | store a session in the distributed store |
public principal authenticate string username string digest string nonce string nc string cnonce string qop string realm string md5a2 return null | return the principal associated with the specified username which |
protected clustered session load session string id clustered session session null if id null return null try pass in the web ctx class loader to handle the loading of classes that originate from the web application war class loader ctx cl super get container get loader get class loader session clustered session proxy get http session id ctx cl catch ejbexception e ignore log debug loading a session out of the clustered store failed e return session | load a session from the distributed store |
public void end sax context ctx throws exception stack st ctx get object stack int top ctx get tag count 1 string tag ctx get tag top engine engine engine st pop object service st pop embedded catalina embedded st peek st push service st push engine catalina add engine engine if ctx get debug 0 ctx log add engine engine get class to embedded | the stack must look like embedded service engine |
protected void remove session string id if id null return try proxy remove http session id catch ejbexception e ignore log debug removing a session out of the clustered store failed e | remove a session from the distributed store |
public void start sax context ctx throws exception stack st ctx get object stack int top ctx get tag count 1 string tag ctx get tag top embedded catalina catalina embedded catalina st peek embedded service service new embedded service service set server catalina st push service if ctx get debug 0 ctx log new embedded service class tag service | the top of the stack must be an embedded catalina object |
private void update time started watching m time started watching system current time millis m time last watched m time started watching m time last did something m time started watching | updates the time watching starts |
public string get jvm route id string id string sessid null if id null if this get jvm route null if this get jvm route equals id substring id last index of 1 id length sessid id substring 0 id last index of 1 this get jvm route log debug jvm route id is sessid else return id return sessid | generate new sessionid for a new jvm route during failover |
public boolean get java2 class loading compliance return this use parent delegation | flag for the standard java2 parent delegation class loading model |
public selector get selector throws invalid selector exception if message selector null return null if selector null selector new selector message selector return selector | determines the consumer would accept the message |
public boolean accepts spy message header header throws jmsexception if header jms destination instanceof spy topic in the topic case we allways deliver unless we have a no local if no local if header producer client id equals connection token get client id return false selector ms get selector if ms null if ms test header return false return true | determines the consumer would accept the message |
public void set java2 class loading compliance boolean compliance this use parent delegation compliance | enable the standard java2 parent delegation class loading model |
private void update time last did something m time last did something system current time millis | updates the time that something was last done |
private void update time last watched m time last watched system current time millis m time last did something m time last watched | updates the time watching last occured |
public int get queue depth throws exception return destination queue get queue depth | gets the queue depth attribute of the basic queue object |
public int get scheduled message count throws exception return destination queue get scheduled message count | gets the scheduled message count attribute of the basic queue object |
public jmsserver interceptor get interceptor return interceptor | gets the jmsserver attribute of the elbamq service object here we |
public int get max inactive interval if is valid throw new illegal state exception sm get string clustered session get max inactive interval ise return this max inactive interval | return the maximum time interval in seconds between client requests |
public object name get destination manager return elbamq service | get the value of elbamq service |
public void set destination manager object name elbamq service this elbamq service elbamq service | set the value of elbamq service |
public int get receivers count return receivers size | retrieve the number of receivers waiting for a message |
public object name get persistence manager return persistence manager | get the value of persistence manager |
public void set persistence manager object name object name this persistence manager object name | set the value of persistence manager |
public array list get receivers synchronized receivers return new array list receivers | retrieve the receivers waiting for a message |
public void set max inactive interval int interval this max inactive interval interval | set the maximum time interval in seconds between client requests |
public object name get state manager return state manager | get the value of state manager |
protected void stop manager throws lifecycle exception if debug 1 log info stopping validate and update our current component state if started throw new lifecycle exception sm get string standard manager not started lifecycle fire lifecycle event stop event null started false stop the background reaper thread cleanup thread thread stop unregister cluster manager mbean from the mbean server try mbean server server mbean server mbean server factory find mbean server null get 0 server unregister mbean object name catch exception e log error could not unregister cluster manager mbean from mbean server e | gracefully terminate the active use of the public methods of this |
private string trim domain string input int trim index input length trim index get non negative minimum input index of trim index trim index get non negative minimum input index of trim index if trim index input length return input else return input substring 0 trim index | cleans up a string used to represent object name domains |
public void set state manager object name object name this state manager object name | set the value of state manager |
public boolean is in use synchronized receivers return receivers size 0 | test whether the queue is in use |
public void add receiver subscription sub boolean trace log is trace enabled synchronized messages if messages size 0 for iterator it messages iterator it has next message reference message message reference it next try if message is expired it remove if trace log trace message expired message drop message message else if sub accepts message get headers queue message for sending to this sub queue message for sending sub message it remove return catch jmsexception ignore log info caught unusual exception in add to receivers ignore add to receivers sub | add a receiver to the queue |
public void remove subscriber subscription sub boolean trace log is trace enabled remove receiver sub synchronized receivers synchronized messages if has unacked messages sub if trace log trace delaying removal of subscriber is has unacked messages sub removed subscribers add sub else if trace log trace removing subscriber sub client consumer sub client consumer remove removed subscription sub subscription id | removes a subscription from the queue |
private void init catalina class loader parent throws exception logger elba log new log4j logger this log realm elba realm new elba security mgr realm catalina new embedded catalina elba log elba realm catalina set debug debug level catalina set use naming false apply any extended configuration config handler handler new config handler log handler apply host config extended config catalina debug level 0 | create and configure a org |
public void client consumer stopped client consumer client consumer remove all waiting subs for this client consumer and send to its blocked list synchronized receivers for iterator it receivers iterator it has next subscription sub subscription it next if sub client consumer equals client consumer client consumer add blocked subscription sub it remove | process a notification that a client is stopping |
public void reset message counter history message counter counter get message counter for int i 0 i counter length i counter i reset history | reset destination message counter history |
public void set message counter history day limit int days if days 1 days 1 message counter counter get message counter for int i 0 i counter length i counter i set history limit days | sets the destination message counter history day limit |
public int get message counter history day limit message counter counter get message counter in case of topic history day limit is the same for all internal queues int days 0 if counter length 0 days counter 0 get history limit return days | gets the destination message counter history day limit |
protected clustered session load session string id clustered session session null if id null return null try session clustered session proxy get http session id catch ejbexception e ignore log debug loading a session out of the clustered store failed e return session | load a session from the distributed store |
public int get queue depth return messages size | retrieve the queue depth |
public long get client timeout return client timeout | returns the client timeout |
public void set client timeout long client timeout this client timeout client timeout | sets the client timeout |
private void setup watchdog numbers set watched mbeans m server query mbeans m watched domain object name null m num watched watched mbeans size | sets the number of mbeans that are being watched |
public http session get session if facade null facade new standard session facade this return facade | return the code http session code for which this object |
public int get scheduled message count return scheduled message count | returns the number of scheduled messages in the queue |
public void set next jmsserver interceptor server this next interceptor server | set next invoker in chain to be called |
public thread group get thread group return next interceptor get thread group | get the thread group of the server |
public void add message message reference mes org elba mq pm tx tx id throws jmsexception the message is removed from the cache on a rollback runnable task new add message post roll back task mes server get persistence manager get tx manager add post rollback task tx id task the message gets added to the queue after the transaction commits task new add message post commit task mes server get persistence manager get tx manager add post commit task tx id task | add a message to the queue |
public void schedule simple timer task task long at task scheduled at synchronized this if is alive start heap insert task if task peek next task notify | schedules a task on the specified heap at a specific time |
private boolean is mbean state suitable for watching int mbean state get mbean state int mbean state this retrieve mbean state return mbean state startable stopped mbean state startable stopping | returns whether this watchdog mbean is in a suitable state for watching |
public void reset message counter jms server reset message counter | reset message counter of all configured destinations |
protected void finalize cancel | calls code cancel code on this object |
public void restore message message reference mes internal add message mes | restores a message |
public thread group get thread group if log is trace enabled return get next get thread group try log trace called get thread group return get next get thread group finally log trace return get thread group | get the thread group of the server |
public message cache get instance return this | the code get instance code method |
public spy xaresource manager get xaresource manager return connection spy xaresource manager | this is used by the asf session pool stuff |
public message reference add spy message message throws javax jms jmsexception return add internal message null message reference not stored | adds a message to the cache |
public void access this is new false this last accessed time this this accessed time this this accessed time system current time millis | update the accessed time information for this session |
public void set enabled connection token dc boolean enabled throws jmsexception client consumer client consumer get client consumer dc client consumer set enabled enabled | sets the enabled attribute of the jmsserver object |
public void set state manager state manager new state manager state manager new state manager | sets the state manager attribute of the jmsserver object |
public void nack messages subscription sub send nacks for unacknowledged messages synchronized receivers synchronized messages int count 0 hash map map hash map unacked by subscription get sub if map null iterator i hash map map clone values iterator while i has next acknowledgement request item acknowledgement request i next try acknowledge item null count catch jmsexception ignore log debug unable to nack message item ignore if log is debug enabled log debug nacked count messages for removed subscription sub | nack all messages for a subscription |
public void add session listener session listener listener synchronized listeners listeners add listener | add a session event listener to this component |
public void set persistence manager org elba mq pm persistence manager new persistence manager persistence manager new persistence manager | sets the persistence manager attribute of the jmsserver object |
public boolean is stopped synchronized state lock return this stopped | returns code false code if the jms server is currently running and |
protected void start service throws exception cache store cache store get server get attribute cache store name instance reference softner new thread this elba mq cache reference softner reference softner set daemon true reference softner start | this gets called to start the cache service |
public void set max inactive interval int interval this max inactive interval interval is modified true | set the maximum time interval in seconds between client requests |
protected void stop service synchronized lru cache reference softner interrupt reference softner null cache store null | this gets called to stop the cache service |
public message counter get message counter return counter | get message counter object |
public hash map get clients return new hash map client consumers | obtain a copy of the current clients |
public int get hard ref cache size synchronized lru cache return lru cache size | gets the hard ref cache size |
protected void add to receivers subscription sub synchronized receivers receivers add sub | add a receiver |
public long get softened size return softened size | the code get softened size code method |
public void passivate notify activation listeners http session event event null string keys keys for int i 0 i keys length i object attribute get attribute keys i if attribute instanceof http session activation listener if event null event new http session event this fixme should we catch throwables http session activation listener attribute session will passivate event | perform the internal processing required to passivate |
public string get id string id null while true try synchronized id lock id id new integer last id to string state manager add logged on client id id break catch exception e return id | gets the id attribute of the jmsserver object |
public void increment counter update message counter count total update timestamp time last update system current time millis update message history update history true | increment message counter and update message history |
protected void remove receiver subscription sub synchronized receivers receivers remove sub | remove a receiver |
public int get soft ref cache size return soft ref cache size | gets the soft ref cache size |
public string get destination name return dest name | gets the related destination name |
public temporary topic get temporary topic connection token dc throws jmsexception string topic name synchronized last temporary topic lock topic name jms tt new integer last temporary topic to string spy temporary topic topic new spy temporary topic topic name dc client consumer client consumer get client consumer dc jmsdestination queue new jmstopic topic client consumer this destinations put topic queue return topic | gets the temporary topic attribute of the jmsserver object |
public string get destination subscription return dest subscription | gets the related destination subscription |
public void activate notify activation listeners http session event event null string keys keys for int i 0 i keys length i object attribute get attribute keys i if attribute instanceof http session activation listener if event null event new http session event this fixme should we catch throwables http session activation listener attribute session did activate event | perform internal processing required to activate this |
public boolean get destination topic return dest topic | gets the related destination topic flag |
public int get total cache size return total cache size | gets the total cache size |
public boolean get destination durable return dest durable | gets the related destination durable subscription flag |
public temporary queue get temporary queue connection token dc throws jmsexception string queue name synchronized last temporary queue lock queue name jms tq new integer last temporary queue to string spy temporary queue new queue new spy temporary queue queue name dc client consumer client consumer get client consumer dc jmsdestination queue new jmsqueue new queue client consumer this destinations put new queue queue return new queue | gets the temporary queue attribute of the jmsserver object |
public int get count return count total | gets the total message count since startup or |
public int get count delta int delta count total count total last count total last count total return delta | gets the message count delta since last method call |
public int get depth return dest queue get queue depth | gets the current message count of pending messages |
public object get note string name synchronized notes return notes get name | return the object bound with the specified name to the internal notes |
public client consumer get client consumer connection token dc throws jmsexception client consumer cq client consumer client consumers get dc if cq null cq new client consumer this dc client consumers put dc cq return cq | gets the client consumer attribute of the jmsserver object |
public int get depth delta int current dest queue get queue depth int delta current depth last depth last current return delta | gets the message count delta of pending messages |
public long get last update return time last update | gets the timestamp of the last message add |
public jmsdestination get jmsdestination spy destination dest return jmsdestination destinations get dest | gets the jmsdestination attribute of the jmsserver object |
public string get counter as string string ret topic queue if dest topic ret topic else ret queue name ret dest name subscription if dest subscription null ret dest subscription else ret durable subscription if dest topic topic if dest durable ret true else ret false else queue ret counter values ret get count get count delta get depth get depth delta timestamp last counter update if time last update 0 date format date format date format get date time instance date format short date format medium ret date format format new date time last update else ret return ret | get message counter data as string in format |
public long get high memory mark return high memory mark one megabyte | gets the high memory mark |
public iterator get note names synchronized notes return notes key set iterator | return an iterator containing the string names of all notes bindings |
public int get history limit return day counter max | get message counter history day count limit |
public void set high memory mark long high memory mark this high memory mark high memory mark one megabyte | sets the high memory mark |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.