# HG changeset patch
# User one
# Date 1376469849 -32400
# Node ID ebf42371454bae7f27a86c94058885506c79e546
# Parent 16135d5e804fbaf7291b1ac97ae34cdbe0f806fa
remove warning
diff -r 16135d5e804f -r ebf42371454b .classpath
--- a/.classpath Fri Jul 19 11:16:48 2013 +0900
+++ b/.classpath Wed Aug 14 17:44:09 2013 +0900
@@ -1,24 +1,50 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 16135d5e804f -r ebf42371454b .project
--- a/.project Fri Jul 19 11:16:48 2013 +0900
+++ b/.project Wed Aug 14 17:44:09 2013 +0900
@@ -1,23 +1,20 @@
- jungle-network
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.m2e.core.maven2Builder
-
-
-
-
-
- org.eclipse.m2e.core.maven2Nature
- org.eclipse.jdt.core.javanature
-
-
+ jungle-network
+ NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.
+
+ jungle-core
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+ org.eclipse.m2e.core.maven2Nature
+ org.eclipse.jdt.core.javanature
+
+
\ No newline at end of file
diff -r 16135d5e804f -r ebf42371454b pom.xml
--- a/pom.xml Fri Jul 19 11:16:48 2013 +0900
+++ b/pom.xml Wed Aug 14 17:44:09 2013 +0900
@@ -66,10 +66,5 @@
functionaljava
3.1
-
- alice
- alice
- 0.1
-
diff -r 16135d5e804f -r ebf42371454b src/alice/jungle/datasegment/store/operations/DefaultTreeOperationLogContainer.java
--- a/src/alice/jungle/datasegment/store/operations/DefaultTreeOperationLogContainer.java Fri Jul 19 11:16:48 2013 +0900
+++ b/src/alice/jungle/datasegment/store/operations/DefaultTreeOperationLogContainer.java Wed Aug 14 17:44:09 2013 +0900
@@ -1,19 +1,13 @@
package alice.jungle.datasegment.store.operations;
import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.Date;
import java.util.LinkedList;
import java.util.List;
-import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.Command;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.NodePath;
-import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultNodePath;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.logger.DefaultTreeOperationLog;
-import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.logger.TreeOperationLog;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.DefaultTreeOperation;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.NodeOperation;
-import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.PutAttributeOperation;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.TreeOperation;
import org.msgpack.MessagePack;
diff -r 16135d5e804f -r ebf42371454b src/alice/jungle/transaction/NetworkDefaultJungleTree.java
--- a/src/alice/jungle/transaction/NetworkDefaultJungleTree.java Fri Jul 19 11:16:48 2013 +0900
+++ b/src/alice/jungle/transaction/NetworkDefaultJungleTree.java Wed Aug 14 17:44:09 2013 +0900
@@ -8,7 +8,6 @@
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.TreeEditor;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.TreeNode;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.transaction.AtomicReservableReference;
-import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.transaction.DefaultTransactionManager;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.transaction.TreeContext;
public class NetworkDefaultJungleTree> implements JungleTree {
diff -r 16135d5e804f -r ebf42371454b src/alice/jungle/transaction/NetworkDefaultJungleTreeEditor.java
--- a/src/alice/jungle/transaction/NetworkDefaultJungleTreeEditor.java Fri Jul 19 11:16:48 2013 +0900
+++ b/src/alice/jungle/transaction/NetworkDefaultJungleTreeEditor.java Wed Aug 14 17:44:09 2013 +0900
@@ -1,10 +1,7 @@
package alice.jungle.transaction;
-import java.io.IOException;
import java.nio.ByteBuffer;
-import alice.jungle.datasegment.store.operations.DefaultTreeOperationLogContainer;
-
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTreeEditor;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.Node;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.NodePath;
@@ -22,13 +19,11 @@
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.trasnformer.DeleteChildAt;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.trasnformer.NodeEditor;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.trasnformer.PutAttribute;
-import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.transaction.DefaultJungleTreeEditor;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.transaction.TransactionManager;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.DefaultEither;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Error;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.IterableConverter;
-import jungle.test.bbs.codesegment.NullCodeSegmentForUpdate;
public class NetworkDefaultJungleTreeEditor> implements JungleTreeEditor {
diff -r 16135d5e804f -r ebf42371454b src/jungle/test/bbs/DistributeApp.java
--- a/src/jungle/test/bbs/DistributeApp.java Fri Jul 19 11:16:48 2013 +0900
+++ b/src/jungle/test/bbs/DistributeApp.java Wed Aug 14 17:44:09 2013 +0900
@@ -1,24 +1,13 @@
package jungle.test.bbs;
-import javax.servlet.Servlet;
-import jungle.test.bbs.codesegment.LogUpdateCodeSegment;
import jungle.test.bbs.codesegment.StartBBSCodeSegment;
-import org.mortbay.jetty.Server;
-import org.mortbay.jetty.servlet.ServletHandler;
-import org.mortbay.jetty.servlet.ServletHolder;
-import alice.daemon.AliceDaemon;
-import alice.datasegment.DataSegment;
import alice.jungle.remote.RemoteConfig;
-import alice.topology.node.StartTopologyNode;
import alice.topology.node.TopologyNode;
-/**
- * Hello world!
- *
- */
+
public class DistributeApp
{
public static void main( String[] args ) throws Exception
diff -r 16135d5e804f -r ebf42371454b src/jungle/test/bbs/JungleManager.java
--- a/src/jungle/test/bbs/JungleManager.java Fri Jul 19 11:16:48 2013 +0900
+++ b/src/jungle/test/bbs/JungleManager.java Wed Aug 14 17:44:09 2013 +0900
@@ -4,24 +4,17 @@
import java.nio.ByteBuffer;
import java.util.Iterator;
-import alice.jungle.core.NetworkDefaultJungle;
import alice.jungle.datasegment.store.operations.DefaultTreeOperationLogContainer;
-import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.DefaultJungle;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.Jungle;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTree;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTreeEditor;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.core.Node;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.Command;
-import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.NodePath;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultNodePath;
-import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.DefaultTreeEditor;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.logger.DefaultTreeOperationLog;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.logger.TreeOperationLog;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.NodeOperation;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.TreeOperation;
-import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.traverser.DefaultTraverser;
-import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.DefaultEither;
-import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.DefaultError;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Error;
diff -r 16135d5e804f -r ebf42371454b src/jungle/test/bbs/NetworkJungleBulletinBoard.java
--- a/src/jungle/test/bbs/NetworkJungleBulletinBoard.java Fri Jul 19 11:16:48 2013 +0900
+++ b/src/jungle/test/bbs/NetworkJungleBulletinBoard.java Wed Aug 14 17:44:09 2013 +0900
@@ -8,7 +8,6 @@
import alice.jungle.core.NetworkDefaultJungle;
import alice.jungle.datasegment.store.operations.DefaultTreeOperationLogContainer;
import alice.jungle.transaction.NetworkDefaultJungleTreeEditor;
-import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.DefaultJungle;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.Jungle;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTree;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.JungleTreeEditor;
@@ -19,13 +18,13 @@
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.TreeOperation;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.trasnformer.EditableNode;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.trasnformer.NodeEditor;
+import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.transaction.DefaultTreeNode;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.traverser.DefaultTraverser;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.DefaultEither;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Either;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.Error;
import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.util.IterableConverter;
import jungle.test.bbs.codesegment.HashLogUpdateCodeSegment;
-import jungle.test.bbs.codesegment.NullCodeSegmentForUpdate;
public class NetworkJungleBulletinBoard implements BulletinBoard
{
@@ -127,14 +126,13 @@
throw new IllegalStateException();
}
- JungleTreeEditor editor;
Either either;
do{
Node node = tree.getRootNode();
int size = node.getChildren().size();
DefaultNodePath path = new DefaultNodePath();
- editor = tree.getTreeEditor();
+ JungleTreeEditor editor = tree.getTreeEditor();
either = editor.addNewChildAt(path,size);
if(either.isA()){
throw new IllegalStateException();
@@ -159,7 +157,8 @@
editor = either.b();
either = editor.success();
try {
- putTreeOperationLog((NetworkDefaultJungleTreeEditor)editor, size, timestamp);
+ NetworkDefaultJungleTreeEditor netEditor = (NetworkDefaultJungleTreeEditor) editor;
+ putTreeOperationLog(netEditor, size, timestamp);
} catch (IOException e1) {
e1.printStackTrace();
}
@@ -169,14 +168,12 @@
public void editMessage(String _board,String _uuid,final String _author,final String _message,final String _editKey)
{
- JungleTreeEditor editor = null;
- Either either = null;
- do{
+ for(;;) {
DefaultNodePath path = new DefaultNodePath();
path = path.add(Integer.parseInt(_uuid));
JungleTree tree = jungle.getTreeByName(_board);
- editor = tree.getTreeEditor();
+ JungleTreeEditor editor = tree.getTreeEditor();
final long timestamp = new Date().getTime();
NodeEditor e = new NodeEditor(){
public > Either edit(T _e){
@@ -189,7 +186,7 @@
}
};
- either = editor.edit(path,e);
+ Either either = editor.edit(path,e);
if(either.isA()){
throw new IllegalStateException();
}
@@ -200,7 +197,11 @@
} catch (IOException e1) {
e1.printStackTrace();
}
- }while(either.isA());
+ if(!either.isA()) {
+ return;
+ }
+ }
+
}
public Iterable getMessages(String _boardName)
@@ -223,7 +224,7 @@
return new IterableConverter(chs,converter);
}
- private void putTreeOperationLog(NetworkDefaultJungleTreeEditor editor, int pos, long timestamp) throws IOException {
+ private void putTreeOperationLog(NetworkDefaultJungleTreeEditor editor, int pos, long timestamp) throws IOException {
String uuid = editor.getID();
String treeName = editor.getTreeName();
String updaterName = editor.getUpdaterName();
diff -r 16135d5e804f -r ebf42371454b src/jungle/test/bbs/codesegment/ChildLogCheckCodeSegment.java
--- a/src/jungle/test/bbs/codesegment/ChildLogCheckCodeSegment.java Fri Jul 19 11:16:48 2013 +0900
+++ b/src/jungle/test/bbs/codesegment/ChildLogCheckCodeSegment.java Wed Aug 14 17:44:09 2013 +0900
@@ -29,7 +29,7 @@
childLog.setKey("local","childLog", index);
hashLog.setKey("hashLog");
}
-
+
public void run() {
int index = childLog.index;
String hostName = host.asString();
diff -r 16135d5e804f -r ebf42371454b src/jungle/test/bbs/codesegment/LogUpdateCodeSegment.java
--- a/src/jungle/test/bbs/codesegment/LogUpdateCodeSegment.java Fri Jul 19 11:16:48 2013 +0900
+++ b/src/jungle/test/bbs/codesegment/LogUpdateCodeSegment.java Wed Aug 14 17:44:09 2013 +0900
@@ -32,7 +32,7 @@
public void run() {
int index = parentLog.index;
- String hostName = host.asString();
+// String hostName = host.asString();
DefaultTreeOperationLogContainer container = parentLog.asClass(DefaultTreeOperationLogContainer.class);
HashSetDataSegment ds = hashLog.asClass(HashSetDataSegment.class);
if(ds.hash.contains(container.getHashLogString())) {
diff -r 16135d5e804f -r ebf42371454b src/jungle/test/bbs/codesegment/StartBBSCodeSegment.java
--- a/src/jungle/test/bbs/codesegment/StartBBSCodeSegment.java Fri Jul 19 11:16:48 2013 +0900
+++ b/src/jungle/test/bbs/codesegment/StartBBSCodeSegment.java Wed Aug 14 17:44:09 2013 +0900
@@ -43,9 +43,9 @@
System.out.println("name : "+ name);
Matcher matcher = pattern.matcher(name);
matcher.find();
- String type = matcher.group(1);
+// String type = matcher.group(1);
-
+ /* Jetty registration */
BulletinBoard cassaBBS = new NetworkJungleBulletinBoard(name);
String createBoardMessagePath = "/createBoardMessage";
String createBoardPath = "/createBoard";