@SuppressWarnings("null")
	public V get(K key) {
		// TODO Auto-generated method stub
		if(hdbState.get() != HdbState.Running)
			return null;
		
		StorageVaue storageValue=storageEngine.get(key);
		
		if(storageValue != null){
			long dataFileId=VCode.getVCode(storageValue.getFileId(),0,null);
			RandomAccessFile randomFile=ReadFileManager.get(dataFileId);
			if(randomFile != null){
				int valueSize=(int) VCode.getVCode(storageValue.getValueSize(),0,null);
				byte valueBody[]=new byte[valueSize];
				try {
					long pos=VCode.getVCode(storageValue.getValuePos(),0,null);
					randomFile.seek(pos);
					if(randomFile.read(valueBody) == -1){
						//force flush
						DataFile dataFile=this.dataFileManager.currentDataFile();
						if(dataFile.getDataFileId() == dataFileId){
							dataFile.flush(true);
						}
						
						if(randomFile.read(valueBody) == -1){
							LOGGER.error("hdb.get()","");
							return null;
						}
					}
				} catch (IOException e) {
					// TODO Auto-generated catch block
					LOGGER.error("hdb.get()",e);
				}
				return this.valueFunc.get(valueBody, 0, (int)VCode.getVCode(storageValue.getValueSize(),0,null));
			}
		}
		return null;
	}