view src/main/java/jp/ac/u_ryukyu/ie/cr/tatsuki/jungle/store/index/LoggingIndexNode.java @ 111:5df5505e1c1e

change Index type
author one
date Mon, 15 Sep 2014 14:07:06 +0900
parents cf17350a2415
children
line wrap: on
line source

package jp.ac.u_ryukyu.ie.cr.tatsuki.jungle.store.index;

import fj.data.List;
import fj.data.TreeMap;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.NodePath;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.TreeNode;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.logger.DefaultOperationLog;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.logger.LoggingAttributes;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.logger.LoggingChildren;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.logger.LoggingNode;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.logger.OperationLog;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Pair;

public class LoggingIndexNode extends LoggingNode {

	
	private final TreeNode wrap;
	private final OperationLog log;
	private TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index;
	
	public LoggingIndexNode(TreeNode wrap ,TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index)
	{
		this(wrap,new DefaultOperationLog(),index);
	}
	
	public LoggingIndexNode(TreeNode wrap,OperationLog log, TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> index)
	{
		super(wrap, log);
		this.wrap = wrap;
		this.log = log;
		this.index = index;
	}

	@Override
	public TreeMap<String, TreeMap<String, List<Pair<TreeNode, NodePath>>>> getIndex(){
		return index;
	}
	
	@Override
	public LoggingAttributes getAttributes()
	{
		return new LoggingIndexAttributes(wrap,log,index);
	}

	@Override
	public LoggingChildren getChildren()
	{
		return new LoggingChildren(wrap,log);
	}
	
	
}