rename register to singleton in Casser
This commit is contained in:
parent
547f34092f
commit
4dd187ed77
4 changed files with 5 additions and 5 deletions
2
pom.xml
2
pom.xml
|
@ -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>
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue