src/com/shrewdify/diaroser/impl/PeerImpl.java
@Override
		public void run() {
			while(true){
				try{
					String str[]=db.removeSession(System.currentTimeMillis()-(delayInMinutes*Constants.SIXTY*Constants.THOUSAND));
					synchronized (sessions) {
						for (String string : str) 
							sessions.remove(string);
					}
					Thread.sleep(delayInMinutes*Constants.SIXTY*Constants.THOUSAND);
				}
				catch(Exception e){}
			}
		}
/**
		 * It starts a thread which continuously remove sessions from db which are inserted or updated before the delay time, 
		 * those requests are also removed from the session, it is used as garbage collector.
		 *  
		 */
It starts a thread which continuously remove sessions from db which are inserted or updated before the delay time,
those requests are also removed from the session, it is used as garbage collector.
It starts a thread which continuously remove sessions from db which are inserted or updated before the delay time those requests are also removed from the session it is used as garbage collector .
@Override
		public void run() {
			while(true){
				try{
					String str[]=db.removeSession(System.currentTimeMillis()-(delayInMinutes*Constants.SIXTY*Constants.THOUSAND));
					synchronized (sessions) {
						for (String string : str) 
							sessions.remove(string);
					}
					Thread.sleep(delayInMinutes*Constants.SIXTY*Constants.THOUSAND);
				}
				catch(Exception e){}
			}
		}
@ Override public void run ( ) { while ( true ) { try { String str [ ] = db . removeSession ( System . currentTimeMillis ( ) - ( delayInMinutes * Constants . SIXTY * Constants . THOUSAND ) ) ; synchronized ( sessions ) { for ( String string : str ) sessions . remove ( string ) ; } Thread . sleep ( delayInMinutes * Constants . SIXTY * Constants . THOUSAND ) ; } catch ( Exception e ) { } } }
It starts a thread which continuously remove sessions from db which are inserted or updated before the delay time,
 those requests are also removed from the session, it is used as garbage collector.
It starts a thread which continuously remove sessions from db which are inserted or updated before the delay time those requests are also removed from the session it is used as garbage collector .