Formatting.

This commit is contained in:
Greg Burd 2018-01-25 11:30:41 -05:00
parent 11de7015c2
commit f168b33f6a
9 changed files with 72 additions and 72 deletions

View file

@ -1,13 +1,6 @@
package net.helenus.core; package net.helenus.core;
import com.google.common.primitives.Primitives; import com.google.common.primitives.Primitives;
import net.helenus.core.reflect.DefaultPrimitiveTypes;
import net.helenus.core.reflect.Drafted;
import net.helenus.core.reflect.MapExportable;
import net.helenus.mapping.HelenusProperty;
import net.helenus.mapping.MappingUtil;
import org.apache.commons.lang3.SerializationUtils;
import java.io.Serializable; import java.io.Serializable;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
@ -15,6 +8,12 @@ import java.util.HashSet;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.Set; import java.util.Set;
import net.helenus.core.reflect.DefaultPrimitiveTypes;
import net.helenus.core.reflect.Drafted;
import net.helenus.core.reflect.MapExportable;
import net.helenus.mapping.HelenusProperty;
import net.helenus.mapping.MappingUtil;
import org.apache.commons.lang3.SerializationUtils;
public abstract class AbstractEntityDraft<E> implements Drafted<E> { public abstract class AbstractEntityDraft<E> implements Drafted<E> {

View file

@ -377,7 +377,6 @@ public abstract class AbstractUnitOfWork<E extends Exception>
if (LOG.isInfoEnabled()) { if (LOG.isInfoEnabled()) {
LOG.info(logTimers("aborted")); LOG.info(logTimers("aborted"));
} }
} }
return new PostCommitFunction(this, null, null, false); return new PostCommitFunction(this, null, null, false);

View file

@ -15,9 +15,8 @@
*/ */
package net.helenus.core; package net.helenus.core;
import java.util.Objects;
import com.datastax.driver.core.querybuilder.Clause; import com.datastax.driver.core.querybuilder.Clause;
import java.util.Objects;
import net.helenus.core.reflect.HelenusPropertyNode; import net.helenus.core.reflect.HelenusPropertyNode;
import net.helenus.mapping.MappingUtil; import net.helenus.mapping.MappingUtil;
import net.helenus.mapping.value.ColumnValuePreparer; import net.helenus.mapping.value.ColumnValuePreparer;

View file

@ -33,8 +33,10 @@ import net.helenus.support.HelenusMappingException;
public final class Helenus { public final class Helenus {
private static final ConcurrentMap<Class<?>, Object> dslCache = new ConcurrentHashMap<Class<?>, Object>(); private static final ConcurrentMap<Class<?>, Object> dslCache =
private static final ConcurrentMap<Class<?>, Metadata> metadataForEntity = new ConcurrentHashMap<Class<?>, Metadata>(); new ConcurrentHashMap<Class<?>, Object>();
private static final ConcurrentMap<Class<?>, Metadata> metadataForEntity =
new ConcurrentHashMap<Class<?>, Metadata>();
private static final Set<HelenusSession> sessions = new HashSet<HelenusSession>(); private static final Set<HelenusSession> sessions = new HashSet<HelenusSession>();
private static volatile HelenusSettings settings = new DefaultHelenusSettings(); private static volatile HelenusSettings settings = new DefaultHelenusSettings();
private static volatile HelenusSession singleton; private static volatile HelenusSession singleton;

View file

@ -100,7 +100,8 @@ public class HelenusSession extends AbstractSessionOperations implements Closeab
this.showCql = showCql; this.showCql = showCql;
this.showValues = showValues; this.showValues = showValues;
this.printStream = printStream; this.printStream = printStream;
this.sessionRepository = sessionRepositoryBuilder == null ? null : sessionRepositoryBuilder.build(); this.sessionRepository =
sessionRepositoryBuilder == null ? null : sessionRepositoryBuilder.build();
this.executor = executor; this.executor = executor;
this.dropSchemaOnClose = dropSchemaOnClose; this.dropSchemaOnClose = dropSchemaOnClose;
this.defaultConsistencyLevel = consistencyLevel; this.defaultConsistencyLevel = consistencyLevel;

View file

@ -15,6 +15,15 @@
*/ */
package net.helenus.core; package net.helenus.core;
import brave.Tracer;
import com.codahale.metrics.MetricRegistry;
import com.datastax.driver.core.CodecRegistry;
import com.datastax.driver.core.ConsistencyLevel;
import com.datastax.driver.core.KeyspaceMetadata;
import com.datastax.driver.core.Session;
import com.datastax.driver.core.TableMetadata;
import com.datastax.driver.core.UserType;
import com.google.common.util.concurrent.MoreExecutors;
import java.io.IOException; import java.io.IOException;
import java.io.PrintStream; import java.io.PrintStream;
import java.util.ArrayDeque; import java.util.ArrayDeque;
@ -27,16 +36,6 @@ import java.util.Set;
import java.util.concurrent.Executor; import java.util.concurrent.Executor;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.function.Consumer; import java.util.function.Consumer;
import brave.Tracer;
import com.codahale.metrics.MetricRegistry;
import com.datastax.driver.core.CodecRegistry;
import com.datastax.driver.core.ConsistencyLevel;
import com.datastax.driver.core.KeyspaceMetadata;
import com.datastax.driver.core.Session;
import com.datastax.driver.core.TableMetadata;
import com.datastax.driver.core.UserType;
import com.google.common.util.concurrent.MoreExecutors;
import net.helenus.core.cache.SessionCache; import net.helenus.core.cache.SessionCache;
import net.helenus.core.reflect.DslExportable; import net.helenus.core.reflect.DslExportable;
import net.helenus.mapping.HelenusEntity; import net.helenus.mapping.HelenusEntity;
@ -332,8 +331,7 @@ public final class SessionInitializer extends AbstractSessionOperations {
} }
}); });
if (session == null) if (session == null) return;
return;
TableOperations tableOps = new TableOperations(this, dropUnusedColumns, dropUnusedIndexes); TableOperations tableOps = new TableOperations(this, dropUnusedColumns, dropUnusedIndexes);
UserTypeOperations userTypeOps = new UserTypeOperations(this, dropUnusedColumns); UserTypeOperations userTypeOps = new UserTypeOperations(this, dropUnusedColumns);

View file

@ -62,12 +62,15 @@ public interface UnitOfWork<X extends Exception> extends AutoCloseable {
void addFuture(CompletableFuture<?> future); void addFuture(CompletableFuture<?> future);
Optional<Object> cacheLookup(String key); Optional<Object> cacheLookup(String key);
Optional<Object> cacheLookup(List<Facet> facets); Optional<Object> cacheLookup(List<Facet> facets);
Object cacheUpdate(String key, Object value); Object cacheUpdate(String key, Object value);
Object cacheUpdate(Object pojo, List<Facet> facets); Object cacheUpdate(Object pojo, List<Facet> facets);
void cacheEvict(String key); void cacheEvict(String key);
List<Facet> cacheEvict(List<Facet> facets); List<Facet> cacheEvict(List<Facet> facets);
public void cacheDelete(String key); public void cacheDelete(String key);

View file

@ -17,7 +17,6 @@ package net.helenus.test.integration.core;
import net.helenus.core.Helenus; import net.helenus.core.Helenus;
import net.helenus.core.HelenusSession; import net.helenus.core.HelenusSession;
import net.helenus.core.SessionInitializer;
import net.helenus.core.UnitOfWork; import net.helenus.core.UnitOfWork;
import net.helenus.test.integration.build.AbstractEmbeddedCassandraTest; import net.helenus.test.integration.build.AbstractEmbeddedCassandraTest;
import org.junit.Test; import org.junit.Test;