private void checkExpiryTime() {  
        double referenceTime = Double.MAX_VALUE;
    	LinkedList<ScheduleItem> removedRes = new LinkedList<ScheduleItem>(); 
        
    	Iterator<ServerReservation> iterRes = reservTable.values().iterator();
    	while(iterRes.hasNext()) {
    		ServerReservation sRes = iterRes.next();
    		ReservationStatus status = sRes.getReservationStatus();

	    	// check for expiry time
	        if (status == ReservationStatus.NOT_COMMITTED &&
	        		sRes.getExpiryTime() <= GridSim.clock()) {
	        	logger.info("Reservation # " + sRes.getID() + " has not been " + 
	        			"committed and has hence been cancelled at time #" + GridSim.clock());
	        	
	        	removeReservation(sRes);  // update the profile
	        	sRes.setStatus(ReservationStatus.CANCELLED);     		
	        	expiryTable.put(sRes.getID(), sRes);
	        	iterRes.remove();
	        	
	        	referenceTime = Math.min(referenceTime, sRes.getStartTime());
	        	removedRes.add(sRes);
	        }
    	}
    	
    	if(removedRes.size() > 0) {

    		//-------------- USED FOR DEBUGGING PURPOSES ONLY -----------------
    		visualizer.notifyListeners(this.get_id(), ActionType.ITEM_CANCELLED, true, removedRes);
            //-----------------------------------------------------------------
    		
    		// performs the compression of the schedule 
    		compressSchedule(referenceTime, false);
    		
	    	//---------------- USED FOR DEBUGGING PURPOSES ONLY ----------------
    		visualizer.notifyListeners(this.get_id(), ActionType.SCHEDULE_CHANGED, true);
	    	//-----------------------------------------------------------------
    	}
    }