rename register to singleton in Casser

This commit is contained in:
Albert Shift 2015-04-26 14:13:36 -07:00
parent 547f34092f
commit 4dd187ed77
4 changed files with 5 additions and 5 deletions

View file

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.noorq.casser</groupId> <groupId>com.noorq.casser</groupId>
<artifactId>casser-core</artifactId> <artifactId>casser-core</artifactId>
<version>1.0</version> <version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>casser</name> <name>casser</name>

View file

@ -47,7 +47,7 @@ public final class Casser {
return Objects.requireNonNull(session, "session is not initialized"); 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) { if (session == null) {
session = newSession; session = newSession;
} }

View file

@ -171,8 +171,8 @@ public final class SessionInitializer extends AbstractSessionOperations {
return this; return this;
} }
public void register() { public void singleton() {
Casser.register(get()); Casser.singelton(get());
} }
public synchronized CasserSession get() { public synchronized CasserSession get() {

View file

@ -34,7 +34,7 @@ public class StaticColumnTest extends AbstractEmbeddedCassandraTest {
@BeforeClass @BeforeClass
public static void beforeTest() { public static void beforeTest() {
Casser.init(getSession()).showCql().add(Message.class).autoCreateDrop().register(); Casser.init(getSession()).showCql().add(Message.class).autoCreateDrop().singleton();
} }
@Test @Test