public synchronized boolean cancelReservation(ReservationMessage message) {
		ServerReservation sRes = null;
		int resId = message.getReservationID();
		String msg = "Reservation # " + resId + " cannot be cancelled ";
		
		if(!reservTable.containsKey(resId)
				&& !expiryTable.containsKey(resId)) {
			logger.info(msg + "because the allocation policy could not find it.");
			return false;
		} else if (expiryTable.containsKey(resId)) {
			logger.info(msg + "because it is already in the expiry list.");
    		return false;
		} else if( (sRes = reservTable.get(resId)).getActualFinishTime() <= GridSim.clock() ) {
			logger.info(msg + "it has already finished.");
    		return false;
		}

		boolean inProgress = sRes.getReservationStatus() == ReservationStatus.IN_PROGRESS;
        reservTable.remove(resId);
        expiryTable.put(resId, sRes);

        removeReservation(sRes);
		sRes.setStatus(ReservationStatus.CANCELLED);
		
		//----------------- USED FOR DEBUGGING PURPOSES ONLY -------------------
		visualizer.notifyListeners(this.get_id(), ActionType.ITEM_CANCELLED, true, sRes);
        //----------------------------------------------------------------------
        
		compressSchedule(sRes.getStartTime(), inProgress);
		
    	//----------------- USED FOR DEBUGGING PURPOSES ONLY -------------------
		visualizer.notifyListeners(this.get_id(), ActionType.SCHEDULE_CHANGED, true);
    	//----------------------------------------------------------------------
		return true;
	}