public DBType getMaxKey(TypeMetadata meta) {
		readLock();
		try {
			if (maxKey == null) {
				List<Record> list = getData();
				if (list == null || list.size() == 0) {
					maxKey = null;
					return null;
				} else {
					Set<Object> pinnedBlocks = new HashSet<Object>();
					try {
						Record record = list.get(list.size()-1);
						DBType value = null;
						if (record instanceof ObjectRecord) {
							DBType column = ((ObjectRecord) record).getColumn();
							value = column;
							if (value instanceof BlockPtr) {
								IndexBlock block = (IndexBlock) BlockManager.getInstance().getBlock((BlockPtr) value, meta, pinnedBlocks);
								maxKey = block.getMaxKey(meta);
							} else if (value instanceof IndexKeyType) {
								maxKey = value;
							} else if (value instanceof ExtendedColumn) {
								maxKey = ((ExtendedColumn) value).getValue(meta);
							} else {
								throw new RuntimeException("unexpected type received");							
							}
						} else {
							throw new RuntimeException("unexpected type received");
						}
						maxKey = maxKey.copyOf();
					} finally {
						CacheEntryPinner.getInstance().unpin(pinnedBlocks, pinnedBlocks);
					}
				}
			}
		} finally {
			readUnlock();
		}
		if (maxKey == null) {
			Logger.getLogger(getClass()).fatal("max key was null");
		}
		return maxKey;
	}