From 4dd187ed77b4d372492df1335ce96841f9be3a6d Mon Sep 17 00:00:00 2001 From: Albert Shift Date: Sun, 26 Apr 2015 14:13:36 -0700 Subject: [PATCH] rename register to singleton in Casser --- pom.xml | 2 +- src/main/java/com/noorq/casser/core/Casser.java | 2 +- src/main/java/com/noorq/casser/core/SessionInitializer.java | 4 ++-- .../casser/test/integration/core/simple/StaticColumnTest.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 4c7e909..655ca8c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.noorq.casser casser-core - 1.0 + 1.0.0-SNAPSHOT jar casser diff --git a/src/main/java/com/noorq/casser/core/Casser.java b/src/main/java/com/noorq/casser/core/Casser.java index ab87065..dc1fe15 100644 --- a/src/main/java/com/noorq/casser/core/Casser.java +++ b/src/main/java/com/noorq/casser/core/Casser.java @@ -47,7 +47,7 @@ public final class Casser { return Objects.requireNonNull(session, "session is not initialized"); } - protected static synchronized void register(CasserSession newSession) { + protected static synchronized void singelton(CasserSession newSession) { if (session == null) { session = newSession; } diff --git a/src/main/java/com/noorq/casser/core/SessionInitializer.java b/src/main/java/com/noorq/casser/core/SessionInitializer.java index 573552c..83f331c 100644 --- a/src/main/java/com/noorq/casser/core/SessionInitializer.java +++ b/src/main/java/com/noorq/casser/core/SessionInitializer.java @@ -171,8 +171,8 @@ public final class SessionInitializer extends AbstractSessionOperations { return this; } - public void register() { - Casser.register(get()); + public void singleton() { + Casser.singelton(get()); } public synchronized CasserSession get() { diff --git a/src/test/java/com/noorq/casser/test/integration/core/simple/StaticColumnTest.java b/src/test/java/com/noorq/casser/test/integration/core/simple/StaticColumnTest.java index 6f08f1f..763987f 100644 --- a/src/test/java/com/noorq/casser/test/integration/core/simple/StaticColumnTest.java +++ b/src/test/java/com/noorq/casser/test/integration/core/simple/StaticColumnTest.java @@ -34,7 +34,7 @@ public class StaticColumnTest extends AbstractEmbeddedCassandraTest { @BeforeClass public static void beforeTest() { - Casser.init(getSession()).showCql().add(Message.class).autoCreateDrop().register(); + Casser.init(getSession()).showCql().add(Message.class).autoCreateDrop().singleton(); } @Test