Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleaned up package structure.

  • Loading branch information...
commit a4091788d2b64fb8fcb7111c4862c9fd3d7af3dd 1 parent fca01fd
@jakewins jakewins authored
Showing with 193 additions and 217 deletions.
  1. +0 −31 src/main/java/org/neo4j/smack/Database.java
  2. +0 −12 src/main/java/org/neo4j/smack/InvalidPropertyException.java
  3. +14 −12 src/main/java/org/neo4j/smack/Smack.java
  4. +1 −2  src/main/java/org/neo4j/smack/api/BasePropertyContainerService.java
  5. +2 −2 src/main/java/org/neo4j/smack/api/DataOperationsDiscoveryService.java
  6. +5 −6 src/main/java/org/neo4j/smack/api/NodeService.java
  7. +5 −6 src/main/java/org/neo4j/smack/api/RelationshipService.java
  8. +1 −1  src/main/java/org/neo4j/smack/api/RestService.java
  9. +5 −6 src/main/java/org/neo4j/smack/api/TransactionService.java
  10. +1 −1  src/main/java/org/neo4j/smack/{routing → api}/UrlReverseLookerUpper.java
  11. +5 −0 src/main/java/org/neo4j/smack/domain/TransactionState.java
  12. +1 −1  src/main/java/org/neo4j/smack/{ → gcfree}/MutableString.java
  13. +1 −1  src/main/java/org/neo4j/smack/{ → gcfree}/MutableStringConverter.java
  14. +1 −1  src/main/java/org/neo4j/smack/{handler → pipeline}/CombinedHandler.java
  15. +1 −1  src/main/java/org/neo4j/smack/{ → pipeline}/DaemonThreadFactory.java
  16. +2 −2 src/main/java/org/neo4j/smack/{handler → pipeline}/DefaultExceptionHandler.java
  17. +4 −3 src/main/java/org/neo4j/smack/{PipelineBootstrap.java → pipeline/RingBufferWorkPipeline.java}
  18. +9 −8 src/main/java/org/neo4j/smack/{InputPipeline.java → pipeline/core/CoreWorkPipeline.java}
  19. +11 −11 src/main/java/org/neo4j/smack/{handler → pipeline/core}/DatabaseWorkDivider.java
  20. +4 −4 src/main/java/org/neo4j/smack/{handler → pipeline/core}/DeserializationHandler.java
  21. +4 −4 src/main/java/org/neo4j/smack/{handler → pipeline/core}/RoutingHandler.java
  22. +4 −5 src/main/java/org/neo4j/smack/{handler → pipeline/core}/TransactionPreparationHandler.java
  23. +1 −1  src/main/java/org/neo4j/smack/{ → pipeline/core}/WorkPublisher.java
  24. +4 −3 src/main/java/org/neo4j/smack/{ → pipeline/core}/WorkTransactionPreparer.java
  25. +7 −5 src/main/java/org/neo4j/smack/{event/RequestEvent.java → pipeline/core/event/CorePipelineEvent.java}
  26. +4 −1 src/main/java/org/neo4j/smack/{ → pipeline/core}/event/TransactionWork.java
  27. +2 −2 src/main/java/org/neo4j/smack/{handler → pipeline/database}/DatabaseWorkPerformer.java
  28. +6 −7 src/main/java/org/neo4j/smack/{DatabaseWorkerThread.java → pipeline/database/DatabaseWorkPipeline.java}
  29. +2 −2 src/main/java/org/neo4j/smack/{handler → pipeline/database}/ExceptionOutputWriter.java
  30. +2 −2 src/main/java/org/neo4j/smack/{ → pipeline/database}/ThreadTransactionManagement.java
  31. +1 −1  src/main/java/org/neo4j/smack/{ → pipeline/database}/TransactionRegistry.java
  32. +6 −4 src/main/java/org/neo4j/smack/{ → pipeline/database}/event/DatabaseWork.java
  33. +2 −2 src/main/java/org/neo4j/smack/{ → pipeline/database}/event/DefaultInvocationImpl.java
  34. +2 −2 src/main/java/org/neo4j/smack/{ → pipeline/database}/event/Invocation.java
  35. +2 −2 src/main/java/org/neo4j/smack/{ → pipeline/database}/event/NettyChannelBackedOutput.java
  36. +1 −1  src/main/java/org/neo4j/smack/{ → pipeline/database}/event/Output.java
  37. +1 −1  src/main/java/org/neo4j/smack/{ → pipeline}/event/Fallible.java
  38. +1 −1  src/main/java/org/neo4j/smack/{ → pipeline}/event/WorkTransactionMode.java
  39. +2 −2 src/main/java/org/neo4j/smack/{ → pipeline}/http/CommonHeaderValues.java
  40. +5 −5 src/main/java/org/neo4j/smack/{ → pipeline}/http/HttpDecoder.java
  41. +1 −1  src/main/java/org/neo4j/smack/{ → pipeline}/http/HttpEncoder.java
  42. +2 −2 src/main/java/org/neo4j/smack/{ → pipeline}/http/HttpHeaderContainer.java
  43. +2 −2 src/main/java/org/neo4j/smack/{ → pipeline}/http/HttpHeaderDecoder.java
  44. +2 −2 src/main/java/org/neo4j/smack/{ → pipeline}/http/HttpHeaderName.java
  45. +1 −1  src/main/java/org/neo4j/smack/{ → pipeline}/http/HttpHeaderNames.java
  46. +1 −1  src/main/java/org/neo4j/smack/{ → pipeline}/http/HttpTokens.java
  47. +1 −1  src/main/java/org/neo4j/smack/{ → pipeline}/http/NettyChannelTrackingHandler.java
  48. +2 −2 src/main/java/org/neo4j/smack/{ → pipeline}/http/NettyHttpHandler.java
  49. +2 −2 src/main/java/org/neo4j/smack/{ → pipeline}/http/NettyHttpPipelineFactory.java
  50. +5 −5 src/main/java/org/neo4j/smack/routing/AnnotationBasedRoutingDefinition.java
  51. +2 −2 src/main/java/org/neo4j/smack/routing/Endpoint.java
  52. +2 −2 src/main/java/org/neo4j/smack/routing/NotFoundEndpoint.java
  53. +1 −1  src/main/java/org/neo4j/smack/routing/ResettableQueryStringDecoder.java
  54. +1 −1  src/main/java/org/neo4j/smack/{ → routing}/annotation/DeserializeWith.java
  55. +1 −1  src/main/java/org/neo4j/smack/{ → routing}/annotation/SerializeWith.java
  56. +1 −1  src/main/java/org/neo4j/smack/{ → routing}/annotation/Transactional.java
  57. +1 −1  src/main/java/org/neo4j/smack/serialization/strategy/NodeSerializationStrategy.java
  58. +1 −1  src/main/java/org/neo4j/smack/serialization/strategy/RelationshipCreationDeserializationStrategy.java
  59. +1 −1  src/main/java/org/neo4j/smack/serialization/strategy/RelationshipSerializationStrategy.java
  60. +1 −1  src/test/java/org/neo4j/smack/{ → gcfree}/TestMutableStringConverter.java
  61. +1 −1  src/test/java/org/neo4j/smack/integration/api/ErrorHandlingIT.java
  62. +4 −3 src/test/java/org/neo4j/smack/{ → pipeline/core}/TestWorkTransactionPreparer.java
  63. +4 −2 src/test/java/org/neo4j/smack/{ → pipeline}/http/TestHttpDecoder.java
  64. +4 −2 src/test/java/org/neo4j/smack/{ → pipeline}/http/TestHttpHeaderContainer.java
  65. +7 −2 src/test/java/org/neo4j/smack/{ → pipeline}/http/TestHttpHeaderDecoder.java
  66. +1 −1  src/test/java/org/neo4j/smack/{ → pipeline}/http/TestHttpHeaderName.java
  67. +3 −3 src/test/java/org/neo4j/smack/routing/TestAnnotationBasedRoutingDefinition.java
  68. +2 −2 src/test/java/org/neo4j/smack/routing/TestRouter.java
  69. +0 −2  src/test/java/org/neo4j/smack/serialization/strategy/SerializationStrategyTestBase.java
  70. +3 −3 src/test/java/org/neo4j/smack/test/util/PerformanceRoutes.java
  71. +1 −1  src/test/java/org/neo4j/smack/test/util/PipelinedHttpClient.java
View
31 src/main/java/org/neo4j/smack/Database.java
@@ -1,31 +0,0 @@
-package org.neo4j.smack;
-
-import org.apache.log4j.Logger;
-import org.neo4j.kernel.AbstractGraphDatabase;
-
-/**
- * @author mh
- * @since 14.11.11
- */
-public class Database
-{
- public static Logger log = Logger.getLogger(Database.class);
-
- public AbstractGraphDatabase graph;
-
- private final String databaseStoreDirectory;
-
- public Database( AbstractGraphDatabase db )
- {
- this.databaseStoreDirectory = db.getStoreDir();
- graph = db;
- }
-
- public AbstractGraphDatabase getGraphDB() {
- return graph;
- }
-
- public String getStoreDirectory() {
- return databaseStoreDirectory;
- }
-}
View
12 src/main/java/org/neo4j/smack/InvalidPropertyException.java
@@ -1,12 +0,0 @@
-package org.neo4j.smack;
-
-public class InvalidPropertyException extends RuntimeException {
-
- public InvalidPropertyException(String message)
- {
- super(message);
- }
-
- private static final long serialVersionUID = 1L;
-
-}
View
26 src/main/java/org/neo4j/smack/Smack.java
@@ -9,14 +9,16 @@
import org.jboss.netty.channel.socket.ServerSocketChannelFactory;
import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
import org.neo4j.graphdb.GraphDatabaseService;
-import org.neo4j.smack.event.RequestEvent;
-import org.neo4j.smack.handler.CombinedHandler;
-import org.neo4j.smack.handler.DatabaseWorkDivider;
-import org.neo4j.smack.handler.DefaultExceptionHandler;
-import org.neo4j.smack.handler.DeserializationHandler;
-import org.neo4j.smack.handler.RoutingHandler;
-import org.neo4j.smack.handler.TransactionPreparationHandler;
-import org.neo4j.smack.http.NettyHttpPipelineFactory;
+import org.neo4j.smack.pipeline.CombinedHandler;
+import org.neo4j.smack.pipeline.DaemonThreadFactory;
+import org.neo4j.smack.pipeline.DefaultExceptionHandler;
+import org.neo4j.smack.pipeline.core.CoreWorkPipeline;
+import org.neo4j.smack.pipeline.core.DatabaseWorkDivider;
+import org.neo4j.smack.pipeline.core.DeserializationHandler;
+import org.neo4j.smack.pipeline.core.RoutingHandler;
+import org.neo4j.smack.pipeline.core.TransactionPreparationHandler;
+import org.neo4j.smack.pipeline.core.event.CorePipelineEvent;
+import org.neo4j.smack.pipeline.http.NettyHttpPipelineFactory;
import org.neo4j.smack.routing.Endpoint;
import org.neo4j.smack.routing.Router;
import org.neo4j.smack.routing.RoutingDefinition;
@@ -28,7 +30,7 @@
private Router router = new Router();
private ServerBootstrap netty;
- private InputPipeline inputPipeline;
+ private CoreWorkPipeline inputPipeline;
private ServerSocketChannelFactory channelFactory;
private ChannelGroup openChannels = new DefaultChannelGroup("SmackServer");
@@ -52,12 +54,12 @@ public void start() {
exceptionHandler = new DefaultExceptionHandler();
workDivider = new DatabaseWorkDivider(database, exceptionHandler);
- inputPipeline = new InputPipeline(exceptionHandler);
+ inputPipeline = new CoreWorkPipeline(exceptionHandler);
- inputPipeline.addHandler(new CombinedHandler<RequestEvent>(
+ inputPipeline.addHandler(new CombinedHandler<CorePipelineEvent>(
new RoutingHandler(router),
new DeserializationHandler()));
- inputPipeline.addHandler(new CombinedHandler<RequestEvent>(
+ inputPipeline.addHandler(new CombinedHandler<CorePipelineEvent>(
new TransactionPreparationHandler(),
workDivider));
View
3  src/main/java/org/neo4j/smack/api/BasePropertyContainerService.java
@@ -1,8 +1,7 @@
package org.neo4j.smack.api;
import org.neo4j.graphdb.PropertyContainer;
-import org.neo4j.smack.event.Invocation;
-import org.neo4j.smack.routing.UrlReverseLookerUpper;
+import org.neo4j.smack.pipeline.database.event.Invocation;
import org.neo4j.smack.serialization.strategy.PropertyContainerDeserialization;
public class BasePropertyContainerService
View
4 src/main/java/org/neo4j/smack/api/DataOperationsDiscoveryService.java
@@ -3,8 +3,8 @@
import javax.ws.rs.GET;
import javax.ws.rs.Path;
-import org.neo4j.smack.event.Invocation;
-import org.neo4j.smack.event.Output;
+import org.neo4j.smack.pipeline.database.event.Invocation;
+import org.neo4j.smack.pipeline.database.event.Output;
public class DataOperationsDiscoveryService {
View
11 src/main/java/org/neo4j/smack/api/NodeService.java
@@ -7,12 +7,11 @@
import javax.ws.rs.Path;
import org.neo4j.graphdb.Node;
-import org.neo4j.smack.annotation.DeserializeWith;
-import org.neo4j.smack.annotation.SerializeWith;
-import org.neo4j.smack.annotation.Transactional;
-import org.neo4j.smack.event.Invocation;
-import org.neo4j.smack.event.Output;
-import org.neo4j.smack.routing.UrlReverseLookerUpper;
+import org.neo4j.smack.pipeline.database.event.Invocation;
+import org.neo4j.smack.pipeline.database.event.Output;
+import org.neo4j.smack.routing.annotation.DeserializeWith;
+import org.neo4j.smack.routing.annotation.SerializeWith;
+import org.neo4j.smack.routing.annotation.Transactional;
import org.neo4j.smack.serialization.strategy.NodeSerializationStrategy;
import org.neo4j.smack.serialization.strategy.PropertyContainerDeserialization;
import org.neo4j.smack.serialization.strategy.PropertyContainerDeserializationStrategy;
View
11 src/main/java/org/neo4j/smack/api/RelationshipService.java
@@ -9,12 +9,11 @@
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.Relationship;
-import org.neo4j.smack.annotation.DeserializeWith;
-import org.neo4j.smack.annotation.SerializeWith;
-import org.neo4j.smack.annotation.Transactional;
-import org.neo4j.smack.event.Invocation;
-import org.neo4j.smack.event.Output;
-import org.neo4j.smack.routing.UrlReverseLookerUpper;
+import org.neo4j.smack.pipeline.database.event.Invocation;
+import org.neo4j.smack.pipeline.database.event.Output;
+import org.neo4j.smack.routing.annotation.DeserializeWith;
+import org.neo4j.smack.routing.annotation.SerializeWith;
+import org.neo4j.smack.routing.annotation.Transactional;
import org.neo4j.smack.serialization.strategy.PropertyContainerDeserialization;
import org.neo4j.smack.serialization.strategy.PropertyContainerDeserializationStrategy;
import org.neo4j.smack.serialization.strategy.PropertyValueDeserializationStrategy;
View
2  src/main/java/org/neo4j/smack/api/RestService.java
@@ -16,7 +16,7 @@
import org.neo4j.server.rest.repr.ExtensionInjector;
import org.neo4j.server.rest.repr.OutputFormat;
import org.neo4j.server.rest.repr.RepresentationFormatRepository;
-import org.neo4j.smack.event.Invocation;
+import org.neo4j.smack.pipeline.database.event.Invocation;
/**
* @author mh
View
11 src/main/java/org/neo4j/smack/api/TransactionService.java
@@ -23,13 +23,12 @@
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
-import org.neo4j.smack.TransactionRegistry;
-import org.neo4j.smack.annotation.DeserializeWith;
-import org.neo4j.smack.annotation.Transactional;
import org.neo4j.smack.domain.TransactionState;
-import org.neo4j.smack.event.Invocation;
-import org.neo4j.smack.event.Output;
-import org.neo4j.smack.routing.UrlReverseLookerUpper;
+import org.neo4j.smack.pipeline.database.TransactionRegistry;
+import org.neo4j.smack.pipeline.database.event.Invocation;
+import org.neo4j.smack.pipeline.database.event.Output;
+import org.neo4j.smack.routing.annotation.DeserializeWith;
+import org.neo4j.smack.routing.annotation.Transactional;
import org.neo4j.smack.serialization.strategy.TxStateDeserializationStrategy;
public class TransactionService {
View
2  ...rg/neo4j/smack/routing/UrlReverseLookerUpper.java → ...va/org/neo4j/smack/api/UrlReverseLookerUpper.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack.routing;
+package org.neo4j.smack.api;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.Relationship;
View
5 src/main/java/org/neo4j/smack/domain/TransactionState.java
@@ -25,6 +25,11 @@
import org.neo4j.smack.serialization.IdentifiableEnum;
+// TODO: Perhaps rethink this, rather than
+// having "domain" objects, this could be a deserialization,
+// something in between a domain object and a deserializer.
+// Doing that would be for the sole purpose of consistency,
+// since other deserialized complex entities are "deserializations".
public enum TransactionState implements IdentifiableEnum {
OPEN(0),
COMMITTED(1),
View
2  src/main/java/org/neo4j/smack/MutableString.java → ...in/java/org/neo4j/smack/gcfree/MutableString.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack;
+package org.neo4j.smack.gcfree;
import java.util.Arrays;
View
2  .../java/org/neo4j/smack/MutableStringConverter.java → ...rg/neo4j/smack/gcfree/MutableStringConverter.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack;
+package org.neo4j.smack.gcfree;
public class MutableStringConverter {
View
2  ...java/org/neo4j/smack/handler/CombinedHandler.java → ...ava/org/neo4j/smack/pipeline/CombinedHandler.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack.handler;
+package org.neo4j.smack.pipeline;
import com.lmax.disruptor.WorkHandler;
View
2  ...ain/java/org/neo4j/smack/DaemonThreadFactory.java → ...org/neo4j/smack/pipeline/DaemonThreadFactory.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack;
+package org.neo4j.smack.pipeline;
import java.util.concurrent.ThreadFactory;
View
4 .../neo4j/smack/handler/DefaultExceptionHandler.java → ...neo4j/smack/pipeline/DefaultExceptionHandler.java
@@ -1,6 +1,6 @@
-package org.neo4j.smack.handler;
+package org.neo4j.smack.pipeline;
-import org.neo4j.smack.event.Fallible;
+import org.neo4j.smack.pipeline.event.Fallible;
import com.lmax.disruptor.ExceptionHandler;
View
7 src/main/java/org/neo4j/smack/PipelineBootstrap.java → .../neo4j/smack/pipeline/RingBufferWorkPipeline.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack;
+package org.neo4j.smack.pipeline;
/**
* @author mh
@@ -11,6 +11,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicLong;
+
import com.lmax.disruptor.BusySpinWaitStrategy;
import com.lmax.disruptor.EventFactory;
import com.lmax.disruptor.ExceptionHandler;
@@ -22,7 +23,7 @@
import com.lmax.disruptor.WorkProcessor;
-public class PipelineBootstrap<E> {
+public class RingBufferWorkPipeline<E> {
protected RingBuffer<E> ringBuffer;
@@ -38,7 +39,7 @@
private String nameForThreads;
- public PipelineBootstrap(String nameForThreads, final EventFactory<E> eventFactory, final ExceptionHandler exceptionHandler) {
+ public RingBufferWorkPipeline(String nameForThreads, final EventFactory<E> eventFactory, final ExceptionHandler exceptionHandler) {
this.nameForThreads = nameForThreads;
this.eventFactory = eventFactory;
this.exceptionHandler = exceptionHandler;
View
17 src/main/java/org/neo4j/smack/InputPipeline.java → ...g/neo4j/smack/pipeline/core/CoreWorkPipeline.java
@@ -1,18 +1,19 @@
-package org.neo4j.smack;
+package org.neo4j.smack.pipeline.core;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
-import org.neo4j.smack.event.RequestEvent;
+import org.neo4j.smack.pipeline.RingBufferWorkPipeline;
+import org.neo4j.smack.pipeline.core.event.CorePipelineEvent;
import org.neo4j.smack.routing.InvocationVerb;
import com.lmax.disruptor.ExceptionHandler;
import com.lmax.disruptor.WorkHandler;
-public class InputPipeline extends PipelineBootstrap<RequestEvent> implements WorkPublisher {
+public class CoreWorkPipeline extends RingBufferWorkPipeline<CorePipelineEvent> implements WorkPublisher {
- public InputPipeline(ExceptionHandler exceptionHandler)
+ public CoreWorkPipeline(ExceptionHandler exceptionHandler)
{
- super("RequestEventHandler", RequestEvent.FACTORY, exceptionHandler);
+ super("RequestEventHandler", CorePipelineEvent.FACTORY, exceptionHandler);
}
@Override
@@ -20,7 +21,7 @@ public void addWork(Long connectionId, InvocationVerb verb, String path,
ChannelBuffer content, Channel channel, boolean keepAlive)
{
long sequenceNo = ringBuffer.next();
- RequestEvent event = ringBuffer.get(sequenceNo);
+ CorePipelineEvent event = ringBuffer.get(sequenceNo);
event.reset(connectionId, verb, path, content, channel, keepAlive);
@@ -31,14 +32,14 @@ public void addWork(Long connectionId, InvocationVerb verb, String path,
public void addFailure(Long connectionId, Channel channel, Throwable cause)
{
long sequenceNo = ringBuffer.next();
- RequestEvent event = ringBuffer.get(sequenceNo);
+ CorePipelineEvent event = ringBuffer.get(sequenceNo);
event.reset(connectionId, channel, cause);
ringBuffer.publish(sequenceNo);
}
- public void addHandler(WorkHandler<RequestEvent> handler)
+ public void addHandler(WorkHandler<CorePipelineEvent> handler)
{
super.addHandler(handler);
}
View
22 .../org/neo4j/smack/handler/DatabaseWorkDivider.java → ...eo4j/smack/pipeline/core/DatabaseWorkDivider.java
@@ -17,14 +17,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package org.neo4j.smack.handler;
+package org.neo4j.smack.pipeline.core;
import org.apache.log4j.Logger;
import org.neo4j.graphdb.GraphDatabaseService;
-import org.neo4j.smack.DatabaseWorkerThread;
-import org.neo4j.smack.ThreadTransactionManagement;
-import org.neo4j.smack.TransactionRegistry;
-import org.neo4j.smack.event.RequestEvent;
+import org.neo4j.smack.pipeline.core.event.CorePipelineEvent;
+import org.neo4j.smack.pipeline.database.DatabaseWorkPipeline;
+import org.neo4j.smack.pipeline.database.ThreadTransactionManagement;
+import org.neo4j.smack.pipeline.database.TransactionRegistry;
import com.lmax.disruptor.ExceptionHandler;
import com.lmax.disruptor.WorkHandler;
@@ -34,14 +34,14 @@
* assigns that work to a worker based on the connection ID (same connection
* always goes to the same worker).
*/
-public class DatabaseWorkDivider implements WorkHandler<RequestEvent> {
+public class DatabaseWorkDivider implements WorkHandler<CorePipelineEvent> {
private final static Logger logger = Logger.getLogger(DatabaseWorkDivider.class);
private static final int NUM_DATABASE_WORK_EXECUTORS = 4;
private final GraphDatabaseService database;
- private final DatabaseWorkerThread[] workers = new DatabaseWorkerThread[NUM_DATABASE_WORK_EXECUTORS];
+ private final DatabaseWorkPipeline[] workers = new DatabaseWorkPipeline[NUM_DATABASE_WORK_EXECUTORS];
private final ExceptionHandler exceptionHandler;
public DatabaseWorkDivider(GraphDatabaseService database, ExceptionHandler exceptionHandler) {
@@ -51,14 +51,14 @@ public DatabaseWorkDivider(GraphDatabaseService database, ExceptionHandler excep
}
@Override
- public void onEvent(RequestEvent event)
+ public void onEvent(CorePipelineEvent event)
{
int workerId = (int) (event.getConnectionId() % NUM_DATABASE_WORK_EXECUTORS);
workers[workerId].addWork(event);
}
public void stop() {
- for (DatabaseWorkerThread worker : workers) {
+ for (DatabaseWorkPipeline worker : workers) {
stopWorker(worker);
}
}
@@ -67,13 +67,13 @@ private void start() {
for (int i = 0; i < NUM_DATABASE_WORK_EXECUTORS; i++) {
TransactionRegistry txs = new TransactionRegistry(database);
ThreadTransactionManagement txManage = new ThreadTransactionManagement(txs);
- DatabaseWorkerThread worker = new DatabaseWorkerThread(database, txs, txManage, exceptionHandler);
+ DatabaseWorkPipeline worker = new DatabaseWorkPipeline(database, txs, txManage, exceptionHandler);
workers[i] = worker;
worker.start();
}
}
- private void stopWorker(DatabaseWorkerThread worker) {
+ private void stopWorker(DatabaseWorkPipeline worker) {
try {
if (worker == null) {
logger.warn("Worker is null");
View
8 ...g/neo4j/smack/handler/DeserializationHandler.java → ...j/smack/pipeline/core/DeserializationHandler.java
@@ -17,20 +17,20 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package org.neo4j.smack.handler;
+package org.neo4j.smack.pipeline.core;
-import org.neo4j.smack.event.RequestEvent;
+import org.neo4j.smack.pipeline.core.event.CorePipelineEvent;
import org.neo4j.smack.serialization.Deserializer;
import org.neo4j.smack.serialization.SerializationFactory;
import com.lmax.disruptor.WorkHandler;
-public class DeserializationHandler implements WorkHandler<RequestEvent> {
+public class DeserializationHandler implements WorkHandler<CorePipelineEvent> {
SerializationFactory serializationFactory = new SerializationFactory();
- public void onEvent(final RequestEvent event)
+ public void onEvent(final CorePipelineEvent event)
throws Exception {
if(!event.hasFailed()) {
Deserializer d = serializationFactory.getDeserializer(event.getInputBuffer());
View
8 .../java/org/neo4j/smack/handler/RoutingHandler.java → ...org/neo4j/smack/pipeline/core/RoutingHandler.java
@@ -17,14 +17,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package org.neo4j.smack.handler;
+package org.neo4j.smack.pipeline.core;
-import org.neo4j.smack.event.RequestEvent;
+import org.neo4j.smack.pipeline.core.event.CorePipelineEvent;
import org.neo4j.smack.routing.Router;
import com.lmax.disruptor.WorkHandler;
-public class RoutingHandler implements WorkHandler<RequestEvent> {
+public class RoutingHandler implements WorkHandler<CorePipelineEvent> {
private Router router;
@@ -32,7 +32,7 @@ public RoutingHandler(Router router) {
this.router = router;
}
- public void onEvent(final RequestEvent event) throws Exception
+ public void onEvent(final CorePipelineEvent event) throws Exception
{
if(!event.hasFailed())
{
View
9 .../smack/handler/TransactionPreparationHandler.java → .../pipeline/core/TransactionPreparationHandler.java
@@ -17,20 +17,19 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package org.neo4j.smack.handler;
+package org.neo4j.smack.pipeline.core;
-import org.neo4j.smack.WorkTransactionPreparer;
-import org.neo4j.smack.event.RequestEvent;
+import org.neo4j.smack.pipeline.core.event.CorePipelineEvent;
import com.lmax.disruptor.WorkHandler;
-public class TransactionPreparationHandler implements WorkHandler<RequestEvent>
+public class TransactionPreparationHandler implements WorkHandler<CorePipelineEvent>
{
private WorkTransactionPreparer txPrepare = new WorkTransactionPreparer();
@Override
- public void onEvent(RequestEvent event)
+ public void onEvent(CorePipelineEvent event)
{
if(!event.hasFailed())
{
View
2  src/main/java/org/neo4j/smack/WorkPublisher.java → .../org/neo4j/smack/pipeline/core/WorkPublisher.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack;
+package org.neo4j.smack.pipeline.core;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
View
7 ...java/org/neo4j/smack/WorkTransactionPreparer.java → .../smack/pipeline/core/WorkTransactionPreparer.java
@@ -1,7 +1,7 @@
-package org.neo4j.smack;
+package org.neo4j.smack.pipeline.core;
-import org.neo4j.smack.event.TransactionWork;
-import org.neo4j.smack.event.WorkTransactionMode;
+import org.neo4j.smack.pipeline.core.event.TransactionWork;
+import org.neo4j.smack.pipeline.event.WorkTransactionMode;
public class WorkTransactionPreparer {
@@ -19,6 +19,7 @@ public void prepare(TransactionWork event)
long txId = event.getTransactionId();
+ // Did the request come in with a tx id?
if (txId == -1l)
{
// Nope, generate one
View
12 ...main/java/org/neo4j/smack/event/RequestEvent.java → .../smack/pipeline/core/event/CorePipelineEvent.java
@@ -17,10 +17,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package org.neo4j.smack.event;
+package org.neo4j.smack.pipeline.core.event;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
+import org.neo4j.smack.pipeline.event.Fallible;
+import org.neo4j.smack.pipeline.event.WorkTransactionMode;
import org.neo4j.smack.routing.Endpoint;
import org.neo4j.smack.routing.InvocationVerb;
import org.neo4j.smack.routing.PathVariables;
@@ -32,11 +34,11 @@
* Note: There are lots of these instances, keep it as slim as possible to
* keep memory usage down.
*/
-public class RequestEvent implements Fallible, Routable, TransactionWork {
+public class CorePipelineEvent implements Fallible, Routable, TransactionWork {
- public static EventFactory<RequestEvent> FACTORY = new EventFactory<RequestEvent>() {
- public RequestEvent newInstance() {
- return new RequestEvent();
+ public static EventFactory<CorePipelineEvent> FACTORY = new EventFactory<CorePipelineEvent>() {
+ public CorePipelineEvent newInstance() {
+ return new CorePipelineEvent();
}
};
View
5 ...n/java/org/neo4j/smack/event/TransactionWork.java → ...4j/smack/pipeline/core/event/TransactionWork.java
@@ -1,4 +1,7 @@
-package org.neo4j.smack.event;
+package org.neo4j.smack.pipeline.core.event;
+
+import org.neo4j.smack.pipeline.event.WorkTransactionMode;
+
public interface TransactionWork {
View
4 ...rg/neo4j/smack/handler/DatabaseWorkPerformer.java → ...mack/pipeline/database/DatabaseWorkPerformer.java
@@ -1,6 +1,6 @@
-package org.neo4j.smack.handler;
+package org.neo4j.smack.pipeline.database;
-import org.neo4j.smack.event.DatabaseWork;
+import org.neo4j.smack.pipeline.database.event.DatabaseWork;
import com.lmax.disruptor.WorkHandler;
View
13 ...in/java/org/neo4j/smack/DatabaseWorkerThread.java → ...smack/pipeline/database/DatabaseWorkPipeline.java
@@ -1,12 +1,11 @@
-package org.neo4j.smack;
+package org.neo4j.smack.pipeline.database;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import org.neo4j.graphdb.GraphDatabaseService;
-import org.neo4j.smack.event.DatabaseWork;
-import org.neo4j.smack.event.RequestEvent;
-import org.neo4j.smack.handler.DatabaseWorkPerformer;
+import org.neo4j.smack.pipeline.core.event.CorePipelineEvent;
+import org.neo4j.smack.pipeline.database.event.DatabaseWork;
import com.lmax.disruptor.BlockingWaitStrategy;
import com.lmax.disruptor.ExceptionHandler;
@@ -21,7 +20,7 @@
// this is actually not a worker thread, it launches a
// worker thread and facilitates communication with that
// thread via a ring buffer.
-public class DatabaseWorkerThread
+public class DatabaseWorkPipeline
{
private static final AtomicInteger workerId = new AtomicInteger();
@@ -39,7 +38,7 @@
private final ThreadTransactionManagement txManage;
- public DatabaseWorkerThread(GraphDatabaseService database, TransactionRegistry txs, ThreadTransactionManagement txManage,
+ public DatabaseWorkPipeline(GraphDatabaseService database, TransactionRegistry txs, ThreadTransactionManagement txManage,
ExceptionHandler exceptionHandler)
{
this.txs = txs;
@@ -79,7 +78,7 @@ public void stop()
processor.halt();
}
- public void addWork(RequestEvent event)
+ public void addWork(CorePipelineEvent event)
{
long sequenceId = workBuffer.next();
View
4 ...rg/neo4j/smack/handler/ExceptionOutputWriter.java → ...mack/pipeline/database/ExceptionOutputWriter.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack.handler;
+package org.neo4j.smack.pipeline.database;
import java.lang.reflect.InvocationTargetException;
import java.util.Collections;
@@ -17,7 +17,7 @@
import org.neo4j.server.rest.web.OperationFailureException;
import org.neo4j.server.rest.web.PropertyValueException;
import org.neo4j.server.rest.web.RelationshipNotFoundException;
-import org.neo4j.smack.event.NettyChannelBackedOutput;
+import org.neo4j.smack.pipeline.database.event.NettyChannelBackedOutput;
import org.neo4j.smack.routing.ResourceNotFoundException;
import org.neo4j.smack.serialization.SerializationStrategy;
import org.neo4j.smack.serialization.strategy.ExceptionSerializationStrategy;
View
4 .../org/neo4j/smack/ThreadTransactionManagement.java → ...ipeline/database/ThreadTransactionManagement.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack;
+package org.neo4j.smack.pipeline.database;
import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
@@ -6,7 +6,7 @@
import javax.transaction.RollbackException;
import javax.transaction.SystemException;
-import org.neo4j.smack.event.WorkTransactionMode;
+import org.neo4j.smack.pipeline.event.WorkTransactionMode;
public class ThreadTransactionManagement {
View
2  ...ain/java/org/neo4j/smack/TransactionRegistry.java → .../smack/pipeline/database/TransactionRegistry.java
@@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package org.neo4j.smack;
+package org.neo4j.smack.pipeline.database;
import java.util.HashMap;
import java.util.Map;
View
10 ...main/java/org/neo4j/smack/event/DatabaseWork.java → ...j/smack/pipeline/database/event/DatabaseWork.java
@@ -1,10 +1,12 @@
-package org.neo4j.smack.event;
+package org.neo4j.smack.pipeline.database.event;
import org.jboss.netty.channel.Channel;
import org.neo4j.graphdb.GraphDatabaseService;
-import org.neo4j.smack.ThreadTransactionManagement;
-import org.neo4j.smack.TransactionRegistry;
-import org.neo4j.smack.handler.ExceptionOutputWriter;
+import org.neo4j.smack.pipeline.database.ExceptionOutputWriter;
+import org.neo4j.smack.pipeline.database.ThreadTransactionManagement;
+import org.neo4j.smack.pipeline.database.TransactionRegistry;
+import org.neo4j.smack.pipeline.event.Fallible;
+import org.neo4j.smack.pipeline.event.WorkTransactionMode;
import org.neo4j.smack.routing.Endpoint;
import org.neo4j.smack.routing.PathVariables;
import org.neo4j.smack.serialization.SerializationFactory;
View
4 .../org/neo4j/smack/event/DefaultInvocationImpl.java → ...ipeline/database/event/DefaultInvocationImpl.java
@@ -17,10 +17,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package org.neo4j.smack.event;
+package org.neo4j.smack.pipeline.database.event;
import org.neo4j.graphdb.GraphDatabaseService;
-import org.neo4j.smack.TransactionRegistry;
+import org.neo4j.smack.pipeline.database.TransactionRegistry;
import org.neo4j.smack.routing.PathVariables;
/**
View
4 src/main/java/org/neo4j/smack/event/Invocation.java → ...o4j/smack/pipeline/database/event/Invocation.java
@@ -17,10 +17,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package org.neo4j.smack.event;
+package org.neo4j.smack.pipeline.database.event;
import org.neo4j.graphdb.GraphDatabaseService;
-import org.neo4j.smack.TransactionRegistry;
+import org.neo4j.smack.pipeline.database.TransactionRegistry;
import org.neo4j.smack.routing.PathVariables;
public interface Invocation {
View
4 ...g/neo4j/smack/event/NettyChannelBackedOutput.java → ...line/database/event/NettyChannelBackedOutput.java
@@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package org.neo4j.smack.event;
+package org.neo4j.smack.pipeline.database.event;
import static org.jboss.netty.handler.codec.http.HttpResponseStatus.CREATED;
import static org.jboss.netty.handler.codec.http.HttpResponseStatus.NOT_FOUND;
@@ -32,7 +32,7 @@
import org.jboss.netty.handler.codec.http.DefaultHttpResponse;
import org.jboss.netty.handler.codec.http.HttpHeaders;
import org.jboss.netty.handler.codec.http.HttpResponseStatus;
-import org.neo4j.smack.ThreadTransactionManagement;
+import org.neo4j.smack.pipeline.database.ThreadTransactionManagement;
import org.neo4j.smack.serialization.SerializationFactory;
import org.neo4j.smack.serialization.SerializationStrategy;
import org.neo4j.smack.serialization.Serializer;
View
2  src/main/java/org/neo4j/smack/event/Output.java → ...g/neo4j/smack/pipeline/database/event/Output.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack.event;
+package org.neo4j.smack.pipeline.database.event;
public interface Output {
View
2  src/main/java/org/neo4j/smack/event/Fallible.java → ...java/org/neo4j/smack/pipeline/event/Fallible.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack.event;
+package org.neo4j.smack.pipeline.event;
public interface Fallible {
View
2  ...va/org/neo4j/smack/event/WorkTransactionMode.java → ...o4j/smack/pipeline/event/WorkTransactionMode.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack.event;
+package org.neo4j.smack.pipeline.event;
public enum WorkTransactionMode {
View
4 ...java/org/neo4j/smack/http/CommonHeaderValues.java → ...neo4j/smack/pipeline/http/CommonHeaderValues.java
@@ -1,6 +1,6 @@
-package org.neo4j.smack.http;
+package org.neo4j.smack.pipeline.http;
-import org.neo4j.smack.MutableString;
+import org.neo4j.smack.gcfree.MutableString;
public class CommonHeaderValues {
View
10 src/main/java/org/neo4j/smack/http/HttpDecoder.java → ...va/org/neo4j/smack/pipeline/http/HttpDecoder.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack.http;
+package org.neo4j.smack.pipeline.http;
import java.util.HashSet;
import java.util.List;
@@ -16,10 +16,10 @@
import org.jboss.netty.handler.codec.http.HttpHeaders;
import org.jboss.netty.handler.codec.http.HttpVersion;
import org.jboss.netty.handler.codec.replay.ReplayingDecoder;
-import org.neo4j.smack.MutableString;
-import org.neo4j.smack.MutableStringConverter;
-import org.neo4j.smack.WorkPublisher;
-import org.neo4j.smack.http.HttpHeaderContainer.HttpHeaderValues;
+import org.neo4j.smack.gcfree.MutableString;
+import org.neo4j.smack.gcfree.MutableStringConverter;
+import org.neo4j.smack.pipeline.core.WorkPublisher;
+import org.neo4j.smack.pipeline.http.HttpHeaderContainer.HttpHeaderValues;
import org.neo4j.smack.routing.InvocationVerb;
/**
View
2  src/main/java/org/neo4j/smack/http/HttpEncoder.java → ...va/org/neo4j/smack/pipeline/http/HttpEncoder.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack.http;
+package org.neo4j.smack.pipeline.http;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
View
4 ...ava/org/neo4j/smack/http/HttpHeaderContainer.java → ...eo4j/smack/pipeline/http/HttpHeaderContainer.java
@@ -1,10 +1,10 @@
-package org.neo4j.smack.http;
+package org.neo4j.smack.pipeline.http;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
-import org.neo4j.smack.MutableString;
+import org.neo4j.smack.gcfree.MutableString;
public class HttpHeaderContainer {
View
4 .../java/org/neo4j/smack/http/HttpHeaderDecoder.java → .../neo4j/smack/pipeline/http/HttpHeaderDecoder.java
@@ -1,10 +1,10 @@
-package org.neo4j.smack.http;
+package org.neo4j.smack.pipeline.http;
import java.util.Set;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.handler.codec.frame.TooLongFrameException;
-import org.neo4j.smack.MutableString;
+import org.neo4j.smack.gcfree.MutableString;
public class HttpHeaderDecoder {
View
4 ...ain/java/org/neo4j/smack/http/HttpHeaderName.java → ...org/neo4j/smack/pipeline/http/HttpHeaderName.java
@@ -1,6 +1,6 @@
-package org.neo4j.smack.http;
+package org.neo4j.smack.pipeline.http;
-import org.neo4j.smack.MutableString;
+import org.neo4j.smack.gcfree.MutableString;
public class HttpHeaderName {
View
2  ...in/java/org/neo4j/smack/http/HttpHeaderNames.java → ...rg/neo4j/smack/pipeline/http/HttpHeaderNames.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack.http;
+package org.neo4j.smack.pipeline.http;
public class HttpHeaderNames {
View
2  src/main/java/org/neo4j/smack/http/HttpTokens.java → ...ava/org/neo4j/smack/pipeline/http/HttpTokens.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack.http;
+package org.neo4j.smack.pipeline.http;
import java.nio.charset.Charset;
View
2  ...neo4j/smack/http/NettyChannelTrackingHandler.java → ...ck/pipeline/http/NettyChannelTrackingHandler.java
@@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package org.neo4j.smack.http;
+package org.neo4j.smack.pipeline.http;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ChannelStateEvent;
View
4 ...n/java/org/neo4j/smack/http/NettyHttpHandler.java → ...g/neo4j/smack/pipeline/http/NettyHttpHandler.java
@@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package org.neo4j.smack.http;
+package org.neo4j.smack.pipeline.http;
import java.util.concurrent.atomic.AtomicLong;
@@ -27,7 +27,7 @@
import org.jboss.netty.channel.ExceptionEvent;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelHandler;
-import org.neo4j.smack.WorkPublisher;
+import org.neo4j.smack.pipeline.core.WorkPublisher;
public class NettyHttpHandler extends SimpleChannelHandler {
View
4 ...rg/neo4j/smack/http/NettyHttpPipelineFactory.java → ...smack/pipeline/http/NettyHttpPipelineFactory.java
@@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package org.neo4j.smack.http;
+package org.neo4j.smack.pipeline.http;
import java.util.concurrent.atomic.AtomicLong;
@@ -26,7 +26,7 @@
import org.jboss.netty.channel.Channels;
import org.jboss.netty.channel.group.ChannelGroup;
import org.jboss.netty.handler.codec.http.HttpResponseEncoder;
-import org.neo4j.smack.WorkPublisher;
+import org.neo4j.smack.pipeline.core.WorkPublisher;
public class NettyHttpPipelineFactory implements ChannelPipelineFactory {
View
10 src/main/java/org/neo4j/smack/routing/AnnotationBasedRoutingDefinition.java
@@ -29,11 +29,11 @@
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
-import org.neo4j.smack.annotation.DeserializeWith;
-import org.neo4j.smack.annotation.SerializeWith;
-import org.neo4j.smack.annotation.Transactional;
-import org.neo4j.smack.event.Invocation;
-import org.neo4j.smack.event.Output;
+import org.neo4j.smack.pipeline.database.event.Invocation;
+import org.neo4j.smack.pipeline.database.event.Output;
+import org.neo4j.smack.routing.annotation.DeserializeWith;
+import org.neo4j.smack.routing.annotation.SerializeWith;
+import org.neo4j.smack.routing.annotation.Transactional;
import org.neo4j.smack.serialization.DeserializationStrategy;
import org.neo4j.smack.serialization.SerializationStrategy;
View
4 src/main/java/org/neo4j/smack/routing/Endpoint.java
@@ -19,8 +19,8 @@
*/
package org.neo4j.smack.routing;
-import org.neo4j.smack.event.Invocation;
-import org.neo4j.smack.event.Output;
+import org.neo4j.smack.pipeline.database.event.Invocation;
+import org.neo4j.smack.pipeline.database.event.Output;
import org.neo4j.smack.serialization.DeserializationStrategy;
import org.neo4j.smack.serialization.SerializationStrategy;
View
4 src/main/java/org/neo4j/smack/routing/NotFoundEndpoint.java
@@ -1,7 +1,7 @@
package org.neo4j.smack.routing;
-import org.neo4j.smack.event.Invocation;
-import org.neo4j.smack.event.Output;
+import org.neo4j.smack.pipeline.database.event.Invocation;
+import org.neo4j.smack.pipeline.database.event.Output;
import org.neo4j.smack.serialization.DeserializationStrategy;
import org.neo4j.smack.serialization.SerializationStrategy;
View
2  src/main/java/org/neo4j/smack/routing/ResettableQueryStringDecoder.java
@@ -10,7 +10,7 @@
import java.util.List;
import java.util.Map;
-import org.neo4j.smack.http.HttpTokens;
+import org.neo4j.smack.pipeline.http.HttpTokens;
// Modified verion of Nettys QueryStringDecoder,
// lets you reuse the same decoder.
View
2  ...a/org/neo4j/smack/annotation/DeserializeWith.java → ...o4j/smack/routing/annotation/DeserializeWith.java
@@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package org.neo4j.smack.annotation;
+package org.neo4j.smack.routing.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
View
2  ...ava/org/neo4j/smack/annotation/SerializeWith.java → ...neo4j/smack/routing/annotation/SerializeWith.java
@@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package org.neo4j.smack.annotation;
+package org.neo4j.smack.routing.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
View
2  ...ava/org/neo4j/smack/annotation/Transactional.java → ...neo4j/smack/routing/annotation/Transactional.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack.annotation;
+package org.neo4j.smack.routing.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
View
2  src/main/java/org/neo4j/smack/serialization/strategy/NodeSerializationStrategy.java
@@ -1,7 +1,7 @@
package org.neo4j.smack.serialization.strategy;
import org.neo4j.graphdb.Node;
-import org.neo4j.smack.routing.UrlReverseLookerUpper;
+import org.neo4j.smack.api.UrlReverseLookerUpper;
import org.neo4j.smack.serialization.SerializationException;
import org.neo4j.smack.serialization.SerializationStrategy;
import org.neo4j.smack.serialization.Serializer;
View
2  src/main/java/org/neo4j/smack/serialization/strategy/RelationshipCreationDeserializationStrategy.java
@@ -4,7 +4,7 @@
import java.util.Map;
import org.neo4j.graphdb.DynamicRelationshipType;
-import org.neo4j.smack.routing.UrlReverseLookerUpper;
+import org.neo4j.smack.api.UrlReverseLookerUpper;
import org.neo4j.smack.serialization.DeserializationStrategy;
import org.neo4j.smack.serialization.Deserializer;
View
2  src/main/java/org/neo4j/smack/serialization/strategy/RelationshipSerializationStrategy.java
@@ -1,7 +1,7 @@
package org.neo4j.smack.serialization.strategy;
import org.neo4j.graphdb.Relationship;
-import org.neo4j.smack.routing.UrlReverseLookerUpper;
+import org.neo4j.smack.api.UrlReverseLookerUpper;
import org.neo4j.smack.serialization.SerializationException;
import org.neo4j.smack.serialization.SerializationStrategy;
import org.neo4j.smack.serialization.Serializer;
View
2  ...a/org/neo4j/smack/TestMutableStringConverter.java → ...eo4j/smack/gcfree/TestMutableStringConverter.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack;
+package org.neo4j.smack.gcfree;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
View
2  src/test/java/org/neo4j/smack/integration/api/ErrorHandlingIT.java
@@ -20,7 +20,7 @@
package org.neo4j.smack.integration.api;
import org.junit.Test;
-import org.neo4j.smack.event.RequestEvent;
+import org.neo4j.smack.pipeline.core.event.CorePipelineEvent;
import org.neo4j.smack.routing.Endpoint;
import org.neo4j.smack.test.util.AbstractRestFunctionalTestBase;
import org.neo4j.smack.test.util.JaxRsResponse;
View
7 .../org/neo4j/smack/TestWorkTransactionPreparer.java → ...ck/pipeline/core/TestWorkTransactionPreparer.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack;
+package org.neo4j.smack.pipeline.core;
import static org.mockito.Matchers.anyLong;
import static org.mockito.Mockito.mock;
@@ -7,8 +7,9 @@
import static org.mockito.Mockito.when;
import org.junit.Test;
-import org.neo4j.smack.event.TransactionWork;
-import org.neo4j.smack.event.WorkTransactionMode;
+import org.neo4j.smack.pipeline.core.WorkTransactionPreparer;
+import org.neo4j.smack.pipeline.core.event.TransactionWork;
+import org.neo4j.smack.pipeline.event.WorkTransactionMode;
public class TestWorkTransactionPreparer
View
6 ...st/java/org/neo4j/smack/http/TestHttpDecoder.java → ...rg/neo4j/smack/pipeline/http/TestHttpDecoder.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack.http;
+package org.neo4j.smack.pipeline.http;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
@@ -16,7 +16,9 @@
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.MessageEvent;
import org.junit.Test;
-import org.neo4j.smack.WorkPublisher;
+import org.neo4j.smack.pipeline.core.WorkPublisher;
+import org.neo4j.smack.pipeline.http.HttpDecoder;
+import org.neo4j.smack.pipeline.http.HttpTokens;
import org.neo4j.smack.routing.InvocationVerb;
public class TestHttpDecoder {
View
6 ...org/neo4j/smack/http/TestHttpHeaderContainer.java → .../smack/pipeline/http/TestHttpHeaderContainer.java
@@ -1,10 +1,12 @@
-package org.neo4j.smack.http;
+package org.neo4j.smack.pipeline.http;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import org.junit.Test;
-import org.neo4j.smack.MutableString;
+import org.neo4j.smack.gcfree.MutableString;
+import org.neo4j.smack.pipeline.http.HttpHeaderContainer;
+import org.neo4j.smack.pipeline.http.HttpHeaderNames;
public class TestHttpHeaderContainer {
View
9 ...a/org/neo4j/smack/http/TestHttpHeaderDecoder.java → ...4j/smack/pipeline/http/TestHttpHeaderDecoder.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack.http;
+package org.neo4j.smack.pipeline.http;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
@@ -8,7 +8,12 @@
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Test;
-import org.neo4j.smack.MutableString;
+import org.neo4j.smack.gcfree.MutableString;
+import org.neo4j.smack.pipeline.http.HttpHeaderContainer;
+import org.neo4j.smack.pipeline.http.HttpHeaderDecoder;
+import org.neo4j.smack.pipeline.http.HttpHeaderName;
+import org.neo4j.smack.pipeline.http.HttpHeaderNames;
+import org.neo4j.smack.pipeline.http.HttpTokens;
public class TestHttpHeaderDecoder {
View
2  ...java/org/neo4j/smack/http/TestHttpHeaderName.java → ...neo4j/smack/pipeline/http/TestHttpHeaderName.java
@@ -1,4 +1,4 @@
-package org.neo4j.smack.http;
+package org.neo4j.smack.pipeline.http;
import org.junit.Test;
View
6 src/test/java/org/neo4j/smack/routing/TestAnnotationBasedRoutingDefinition.java
@@ -13,9 +13,9 @@
import javax.ws.rs.Path;
import org.junit.Test;
-import org.neo4j.smack.annotation.DeserializeWith;
-import org.neo4j.smack.annotation.SerializeWith;
-import org.neo4j.smack.annotation.Transactional;
+import org.neo4j.smack.routing.annotation.DeserializeWith;
+import org.neo4j.smack.routing.annotation.SerializeWith;
+import org.neo4j.smack.routing.annotation.Transactional;
import org.neo4j.smack.serialization.strategy.NodeSerializationStrategy;
import org.neo4j.smack.serialization.strategy.PropertyContainerDeserializationStrategy;
View
4 src/test/java/org/neo4j/smack/routing/TestRouter.java
@@ -6,8 +6,8 @@
import static org.junit.Assert.assertThat;
import org.junit.Test;
-import org.neo4j.smack.event.Invocation;
-import org.neo4j.smack.event.Output;
+import org.neo4j.smack.pipeline.database.event.Invocation;
+import org.neo4j.smack.pipeline.database.event.Output;
import org.neo4j.smack.serialization.DeserializationStrategy;
import org.neo4j.smack.serialization.SerializationStrategy;
View
2  src/test/java/org/neo4j/smack/serialization/strategy/SerializationStrategyTestBase.java
@@ -19,6 +19,4 @@
JsonDeserializer deserializer = new JsonDeserializer(jsonFactory, in);
return strategy.deserialize(deserializer);
}
-
-
}
View
6 src/test/java/org/neo4j/smack/test/util/PerformanceRoutes.java
@@ -3,9 +3,9 @@
import javax.ws.rs.GET;
import javax.ws.rs.Path;
-import org.neo4j.smack.event.Invocation;
-import org.neo4j.smack.event.NettyChannelBackedOutput;
-import org.neo4j.smack.event.Output;
+import org.neo4j.smack.pipeline.database.event.Invocation;
+import org.neo4j.smack.pipeline.database.event.NettyChannelBackedOutput;
+import org.neo4j.smack.pipeline.database.event.Output;
import org.neo4j.smack.routing.Endpoint;
import org.neo4j.smack.routing.InvocationVerb;
import org.neo4j.smack.routing.RoutingDefinition;
View
2  src/test/java/org/neo4j/smack/test/util/PipelinedHttpClient.java
@@ -31,7 +31,7 @@
import org.jboss.netty.handler.codec.http.HttpVersion;
import org.jboss.netty.handler.codec.replay.ReplayingDecoder;
import org.jboss.netty.util.CharsetUtil;
-import org.neo4j.smack.http.NettyChannelTrackingHandler;
+import org.neo4j.smack.pipeline.http.NettyChannelTrackingHandler;
/**
* Incomplete implementation of a HTTP client that does pipelining.
Please sign in to comment.
Something went wrong with that request. Please try again.