diff src/main/java/alice/jungle/persistent/PersistentTransactionManager.java @ 178:d6944d788121

fit Junglecore
author tatsuki
date Thu, 04 Sep 2014 13:12:25 +0900
parents 6f104ab4eb81
children 2828205bdc3a
line wrap: on
line diff
--- a/src/main/java/alice/jungle/persistent/PersistentTransactionManager.java	Mon Sep 01 17:16:20 2014 +0900
+++ b/src/main/java/alice/jungle/persistent/PersistentTransactionManager.java	Thu Sep 04 13:12:25 2014 +0900
@@ -15,15 +15,15 @@
 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either;
 import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Error;
 
-public class PersistentTransactionManager<T extends TreeNode> implements TransactionManager<T> { 
-	private final AtomicReservableReference<TreeContext<T>> repository;
-	private final TreeContext<T> tip;
+public class PersistentTransactionManager implements TransactionManager { 
+	private final AtomicReservableReference<TreeContext> repository;
+	private final TreeContext tip;
 	private final ChangeListWriter writer;
 	private final String uuid;		
 	private final String treeName;	
 
-	public PersistentTransactionManager(String _treeName, ChangeListWriter _writer,TreeContext<T> _tip,
-			AtomicReservableReference<TreeContext<T>> _repository,String _uuid)
+	public PersistentTransactionManager(String _treeName, ChangeListWriter _writer,TreeContext _tip,
+			AtomicReservableReference<TreeContext> _repository,String _uuid)
 	{
 		repository = _repository;
 		tip = _tip;
@@ -33,7 +33,7 @@
 	}
 	
 	@Override
-	public Either<Error, TransactionManager<T>> commit(TreeNode _newRoot,final TreeOperationLog _log) {
+	public Either<Error, TransactionManager> commit(TreeNode _newRoot,final TreeOperationLog _log) {
 		ChangeSet cs = tip.getChangeSet();
 		long currentRevision = cs.revision();
 		long nextRevision = currentRevision + 1;
@@ -41,7 +41,7 @@
 		PersistentChangeList list = new PersistentChangeList(uuid, treeName, _log);
 		TreeNode root = _newRoot;
 		PersistentChangeSet newCs = new PersistentChangeSet(root, cs, list, uuid, treeName, nextRevision);
-		DefaultTreeContext<T> newContext = new DefaultTreeContext<T>(_newRoot,newCs);
+		DefaultTreeContext newContext = new DefaultTreeContext(_newRoot,newCs);
 		
 		@SuppressWarnings("rawtypes")
 		Reservation reservation = repository.makeReservation(tip, newContext);
@@ -53,7 +53,7 @@
 			return DefaultEither.newA((Error)new DefaultError());
 		}
 		reservation.confirm();
-		TransactionManager<T> txManager = new PersistentTransactionManager<T>(treeName, writer, newContext, repository, uuid);
+		TransactionManager txManager = new PersistentTransactionManager(treeName, writer, newContext, repository, uuid);
 		return DefaultEither.newB(txManager);
 	}