Mercurial > hg > Members > shoshi > jungle > bulletinboard
changeset 19:8e44d61b8a65
Log
author | one |
---|---|
date | Thu, 04 Sep 2014 13:11:50 +0900 |
parents | 1515eeb54784 |
children | b3aaff7d9500 |
files | pom.xml src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/bbs/JungleBulletinBoard.java |
diffstat | 2 files changed, 47 insertions(+), 78 deletions(-) [+] |
line wrap: on
line diff
--- a/pom.xml Wed Sep 03 23:52:10 2014 +0900 +++ b/pom.xml Thu Sep 04 13:11:50 2014 +0900 @@ -1,63 +1,58 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> - <groupId>jp.ac.u_ryukyu.ie.cr.shoshi.jungle</groupId> - <artifactId>bulletinboard</artifactId> - <version>0.0.1-SNAPSHOT</version> - <packaging>jar</packaging> + <groupId>jp.ac.u_ryukyu.ie.cr.shoshi.jungle</groupId> + <artifactId>bulletinboard</artifactId> + <version>0.0.1-SNAPSHOT</version> + <packaging>jar</packaging> - <name>bulletinboard</name> - <url>http://maven.apache.org</url> + <name>bulletinboard</name> + <url>http://maven.apache.org</url> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.1</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.eclipse.jetty</groupId> - <artifactId>jetty-server</artifactId> - <version>9.1.1.v20140108</version> - </dependency> - <dependency> - <groupId>org.hectorclient</groupId> - <artifactId>hector-core</artifactId> - <version>1.1-2</version> - </dependency> - <dependency> - <groupId>org.apache.cassandra</groupId> - <artifactId>cassandra-all</artifactId> - <version>1.2.1</version> - <exclusions> - <exclusion> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - </exclusion> - <exclusion> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-server</artifactId> + <version>9.1.1.v20140108</version> + </dependency> + <dependency> + <groupId>org.hectorclient</groupId> + <artifactId>hector-core</artifactId> + <version>1.1-2</version> + </dependency> + <dependency> + <groupId>org.apache.cassandra</groupId> + <artifactId>cassandra-all</artifactId> + <version>1.2.1</version> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> <groupId>com.eaio.uuid</groupId> <artifactId>uuid</artifactId> <version>3.3</version> </dependency> - <dependency> - <groupId>jungle</groupId> - <artifactId>jungle-core</artifactId> - <version>0.0.1-SNAPSHOT</version> - </dependency> - </dependencies> - <repositories> + </dependencies> + <repositories> <repository> <id>eaio.com</id> <url>http://eaio.com/maven2</url>
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/bbs/JungleBulletinBoard.java Wed Sep 03 23:52:10 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/shoshi/jungle/bbs/JungleBulletinBoard.java Thu Sep 04 13:11:50 2014 +0900 @@ -15,14 +15,13 @@ import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.impl.logger.OperationLog; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.store.operations.PutAttributeOperation; 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; -public class JungleBulletinBoard<T extends TreeNode> implements +public class JungleBulletinBoard implements BulletinBoard { private final Jungle jungle; @@ -91,14 +90,6 @@ return DefaultEither.newB(node); } - public OperationLog getLog(){ - OperationLog op = new DefaultOperationLog(); - op = op.add( new PutAttributeOperation("author", ByteBuffer.wrap(_author.getBytes()))); - op = op.add(new PutAttributeOperation("mes", ByteBuffer.wrap(_initMessage.getBytes()))); - op = op.add(new PutAttributeOperation("key", ByteBuffer.wrap(_editKey.getBytes()))); - return op; - } - }; either = editor.edit(root.add(0), e); @@ -138,14 +129,6 @@ return DefaultEither.newB(node); } - public OperationLog getLog(){ - OperationLog op = new DefaultOperationLog(); - op = op.add( new PutAttributeOperation("author", ByteBuffer.wrap(_author.getBytes()))); - op = op.add(new PutAttributeOperation("mes", ByteBuffer.wrap(_message.getBytes()))); - op = op.add(new PutAttributeOperation("key", ByteBuffer.wrap(_editKey.getBytes()))); - return op; - } - }; path = path.add(size); @@ -175,15 +158,6 @@ return DefaultEither.newB(node); } - public OperationLog getLog(){ - OperationLog op = new DefaultOperationLog(); - op = op.add( new PutAttributeOperation("author", ByteBuffer.wrap(_author.getBytes()))); - op = op.add(new PutAttributeOperation("mes", ByteBuffer.wrap(_message.getBytes()))); - op = op.add(new PutAttributeOperation("key", ByteBuffer.wrap(_editKey.getBytes()))); - return op; - } - - }; Either<Error, JungleTreeEditor> either = editor.edit(path, e);