提交 31d061b6 编写于 作者: V Vlad Ilyushchenko

package refactoring

上级 59308633
......@@ -22,7 +22,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<version>2.1.1-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
<groupId>com.nfsdb</groupId>
<artifactId>nfsdb-core</artifactId>
<packaging>jar</packaging>
......
......@@ -14,11 +14,11 @@
* limitations under the License.
*/
package com.nfsdb.journal;
package com.nfsdb;
import com.nfsdb.journal.collections.DirectLongList;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.utils.Interval;
import com.nfsdb.collections.DirectLongList;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.utils.Interval;
public abstract class AbstractResultSetBuilder<T, X> {
protected final DirectLongList result = new DirectLongList();
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal;
package com.nfsdb;
public class BinarySearch {
......
......@@ -14,33 +14,33 @@
* limitations under the License.
*/
package com.nfsdb.journal;
import com.nfsdb.journal.collections.DirectLongList;
import com.nfsdb.journal.column.ColumnType;
import com.nfsdb.journal.column.FixedColumn;
import com.nfsdb.journal.column.SymbolTable;
import com.nfsdb.journal.concurrent.TimerCache;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.journal.factory.JournalClosingListener;
import com.nfsdb.journal.factory.configuration.Constants;
import com.nfsdb.journal.factory.configuration.JournalMetadata;
import com.nfsdb.journal.iterators.ConcurrentIterator;
import com.nfsdb.journal.iterators.JournalPeekingIterator;
import com.nfsdb.journal.iterators.JournalRowBufferedIterator;
import com.nfsdb.journal.lang.cst.impl.jsrc.JournalSourceImpl;
import com.nfsdb.journal.lang.cst.impl.psrc.JournalPartitionSource;
import com.nfsdb.journal.lang.cst.impl.qry.JournalRecordSource;
import com.nfsdb.journal.lang.cst.impl.rsrc.AllRowSource;
import com.nfsdb.journal.query.api.Query;
import com.nfsdb.journal.query.spi.QueryImpl;
import com.nfsdb.journal.tx.Tx;
import com.nfsdb.journal.tx.TxLog;
import com.nfsdb.journal.utils.Dates;
import com.nfsdb.journal.utils.Interval;
import com.nfsdb.journal.utils.Rows;
import com.nfsdb.journal.utils.Unsafe;
package com.nfsdb;
import com.nfsdb.collections.DirectLongList;
import com.nfsdb.column.ColumnType;
import com.nfsdb.column.FixedColumn;
import com.nfsdb.column.SymbolTable;
import com.nfsdb.concurrent.TimerCache;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.exceptions.JournalRuntimeException;
import com.nfsdb.factory.JournalClosingListener;
import com.nfsdb.factory.configuration.Constants;
import com.nfsdb.factory.configuration.JournalMetadata;
import com.nfsdb.iterators.ConcurrentIterator;
import com.nfsdb.iterators.JournalPeekingIterator;
import com.nfsdb.iterators.JournalRowBufferedIterator;
import com.nfsdb.lang.cst.impl.jsrc.JournalSourceImpl;
import com.nfsdb.lang.cst.impl.psrc.JournalPartitionSource;
import com.nfsdb.lang.cst.impl.qry.JournalRecordSource;
import com.nfsdb.lang.cst.impl.rsrc.AllRowSource;
import com.nfsdb.query.api.Query;
import com.nfsdb.query.spi.QueryImpl;
import com.nfsdb.tx.Tx;
import com.nfsdb.tx.TxLog;
import com.nfsdb.utils.Dates;
import com.nfsdb.utils.Interval;
import com.nfsdb.utils.Rows;
import com.nfsdb.utils.Unsafe;
import java.io.Closeable;
import java.io.File;
......@@ -302,7 +302,7 @@ public class Journal<T> implements Iterable<T>, Closeable {
* Get the highest global row id of the Journal.
*
* @return the highest global row id of the Journal
* @throws com.nfsdb.journal.exceptions.JournalException if there is an error
* @throws com.nfsdb.exceptions.JournalException if there is an error
*/
public long getMaxRowID() throws JournalException {
Partition<T> p = getLastPartition();
......@@ -419,7 +419,7 @@ public class Journal<T> implements Iterable<T>, Closeable {
* Read an object by global row id
*
* @param rowID the global row id to read
* @throws com.nfsdb.journal.exceptions.JournalException if there is an error
* @throws com.nfsdb.exceptions.JournalException if there is an error
*/
public void read(long rowID, T obj) throws JournalException {
getPartition(Rows.toPartitionIndex(rowID), true).read(Rows.toLocalRowID(rowID), obj);
......@@ -430,7 +430,7 @@ public class Journal<T> implements Iterable<T>, Closeable {
*
* @param rowIDs the global row ids to read
* @return some objects
* @throws com.nfsdb.journal.exceptions.JournalException if there is an error
* @throws com.nfsdb.exceptions.JournalException if there is an error
*/
@SuppressWarnings("unchecked")
public T[] read(DirectLongList rowIDs) throws JournalException {
......@@ -446,7 +446,7 @@ public class Journal<T> implements Iterable<T>, Closeable {
*
* @param rowID the global row id to read
* @return an object
* @throws com.nfsdb.journal.exceptions.JournalException if there is an error
* @throws com.nfsdb.exceptions.JournalException if there is an error
*/
public T read(long rowID) throws JournalException {
return getPartition(Rows.toPartitionIndex(rowID), true).read(Rows.toLocalRowID(rowID));
......@@ -597,7 +597,7 @@ public class Journal<T> implements Iterable<T>, Closeable {
columnMetadata = new ColumnMetadata[columnCount];
for (int i = 0; i < columnCount; i++) {
columnMetadata[i] = new ColumnMetadata();
com.nfsdb.journal.factory.configuration.ColumnMetadata meta = metadata.getColumnMetadata(i);
com.nfsdb.factory.configuration.ColumnMetadata meta = metadata.getColumnMetadata(i);
if (meta.type == ColumnType.SYMBOL && meta.sameAs == null) {
int tabIndex = symbolTables.size();
int tabSize = tx.symbolTableSizes.length > tabIndex ? tx.symbolTableSizes[tabIndex] : 0;
......@@ -613,7 +613,7 @@ public class Journal<T> implements Iterable<T>, Closeable {
private void configureSymbolTableSynonyms() {
for (int i = 0; i < getMetadata().getColumnCount(); i++) {
com.nfsdb.journal.factory.configuration.ColumnMetadata meta = metadata.getColumnMetadata(i);
com.nfsdb.factory.configuration.ColumnMetadata meta = metadata.getColumnMetadata(i);
if (meta.type == ColumnType.SYMBOL && meta.sameAs != null) {
SymbolTable tab = getSymbolTable(meta.sameAs);
symbolTableMap.put(meta.name, tab);
......@@ -712,6 +712,6 @@ public class Journal<T> implements Iterable<T>, Closeable {
public static class ColumnMetadata {
public SymbolTable symbolTable;
public com.nfsdb.journal.factory.configuration.ColumnMetadata meta;
public com.nfsdb.factory.configuration.ColumnMetadata meta;
}
}
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,11 +14,11 @@
* limitations under the License.
*/
package com.nfsdb.journal;
package com.nfsdb;
import com.nfsdb.journal.concurrent.TimerCache;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.factory.configuration.JournalMetadata;
import com.nfsdb.concurrent.TimerCache;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.factory.configuration.JournalMetadata;
public class JournalBulkReader<T> extends Journal<T> {
public JournalBulkReader(JournalMetadata<T> metadata, JournalKey<T> key, TimerCache timerCache) throws JournalException {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,11 +14,11 @@
* limitations under the License.
*/
package com.nfsdb.journal;
package com.nfsdb;
import com.nfsdb.journal.concurrent.TimerCache;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.factory.configuration.JournalMetadata;
import com.nfsdb.concurrent.TimerCache;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.factory.configuration.JournalMetadata;
public class JournalBulkWriter<T> extends JournalWriter<T> {
public JournalBulkWriter(JournalMetadata<T> metadata, JournalKey<T> key, TimerCache timerCache) throws JournalException {
......
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal;
package com.nfsdb;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.exceptions.JournalException;
import java.io.InputStream;
import java.io.OutputStream;
......
......@@ -14,12 +14,12 @@
* limitations under the License.
*/
package com.nfsdb.journal;
package com.nfsdb;
import com.nfsdb.journal.column.*;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.journal.utils.Checksum;
import com.nfsdb.column.*;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.exceptions.JournalRuntimeException;
import com.nfsdb.utils.Checksum;
import java.io.InputStream;
import java.io.OutputStream;
......
......@@ -14,11 +14,11 @@
* limitations under the License.
*/
package com.nfsdb.journal;
package com.nfsdb;
import com.nfsdb.journal.factory.configuration.Constants;
import com.nfsdb.journal.utils.ByteBuffers;
import com.nfsdb.journal.utils.Files;
import com.nfsdb.factory.configuration.Constants;
import com.nfsdb.utils.ByteBuffers;
import com.nfsdb.utils.Files;
import java.nio.ByteBuffer;
......@@ -84,6 +84,15 @@ public class JournalKey<T> {
this.ordered = ordered;
}
private JournalKey(String clazz, String location, PartitionType partitionType, int recordHint, boolean ordered) {
this.modelClass = null;
this.id = clazz;
this.location = location;
this.partitionType = partitionType;
this.recordHint = recordHint;
this.ordered = ordered;
}
public static JournalKey<Object> fromBuffer(ByteBuffer buffer) {
// id
int clazzLen = buffer.getInt();
......@@ -151,6 +160,8 @@ public class JournalKey<T> {
return result;
}
//////////////////////// REPLICATION CODE //////////////////////
@Override
public String toString() {
return "JournalKey{" +
......@@ -162,8 +173,6 @@ public class JournalKey<T> {
'}';
}
//////////////////////// REPLICATION CODE //////////////////////
public int getBufferSize() {
return 4 + id.getBytes(Files.UTF_8).length + 4 + 2 * (location == null ? 0 : location.length()) + 1 + 1 + 4;
}
......@@ -184,13 +193,4 @@ public class JournalKey<T> {
// ordered
buffer.put((byte) (ordered ? 1 : 0));
}
private JournalKey(String clazz, String location, PartitionType partitionType, int recordHint, boolean ordered) {
this.modelClass = null;
this.id = clazz;
this.location = location;
this.partitionType = partitionType;
this.recordHint = recordHint;
this.ordered = ordered;
}
}
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal;
package com.nfsdb;
public enum JournalMode {
READ, BULK_READ, APPEND, BULK_APPEND
......
......@@ -14,25 +14,25 @@
* limitations under the License.
*/
package com.nfsdb.journal;
import com.nfsdb.journal.column.FixedColumn;
import com.nfsdb.journal.column.HugeBuffer;
import com.nfsdb.journal.column.SymbolTable;
import com.nfsdb.journal.concurrent.PartitionCleaner;
import com.nfsdb.journal.concurrent.TimerCache;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.journal.factory.configuration.Constants;
import com.nfsdb.journal.factory.configuration.JournalMetadata;
import com.nfsdb.journal.iterators.ConcurrentIterator;
import com.nfsdb.journal.iterators.MergingIterator;
import com.nfsdb.journal.iterators.PeekingIterator;
import com.nfsdb.journal.locks.Lock;
import com.nfsdb.journal.locks.LockManager;
import com.nfsdb.journal.logging.Logger;
import com.nfsdb.journal.tx.*;
import com.nfsdb.journal.utils.*;
package com.nfsdb;
import com.nfsdb.column.FixedColumn;
import com.nfsdb.column.HugeBuffer;
import com.nfsdb.column.SymbolTable;
import com.nfsdb.concurrent.PartitionCleaner;
import com.nfsdb.concurrent.TimerCache;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.exceptions.JournalRuntimeException;
import com.nfsdb.factory.configuration.Constants;
import com.nfsdb.factory.configuration.JournalMetadata;
import com.nfsdb.iterators.ConcurrentIterator;
import com.nfsdb.iterators.MergingIterator;
import com.nfsdb.iterators.PeekingIterator;
import com.nfsdb.locks.Lock;
import com.nfsdb.locks.LockManager;
import com.nfsdb.logging.Logger;
import com.nfsdb.tx.*;
import com.nfsdb.utils.*;
import java.io.File;
import java.io.FileFilter;
......@@ -185,7 +185,7 @@ public class JournalWriter<T> extends Journal<T> {
* have lag partitions.
*
* @return Lag partition instance.
* @throws com.nfsdb.journal.exceptions.JournalException
* @throws com.nfsdb.exceptions.JournalException
*/
public Partition<T> openOrCreateLagPartition() throws JournalException {
Partition<T> result = getIrregularPartition();
......@@ -291,7 +291,7 @@ public class JournalWriter<T> extends Journal<T> {
/**
* Deletes entire Journal.
*
* @throws com.nfsdb.journal.exceptions.JournalException if the Journal is open (must be closed)
* @throws com.nfsdb.exceptions.JournalException if the Journal is open (must be closed)
*/
public void delete() throws JournalException {
if (isOpen()) {
......@@ -304,7 +304,7 @@ public class JournalWriter<T> extends Journal<T> {
* Add objects to the end of the Journal.
*
* @param objects objects to add
* @throws com.nfsdb.journal.exceptions.JournalException if there is an error
* @throws com.nfsdb.exceptions.JournalException if there is an error
*/
public void append(Iterable<T> objects) throws JournalException {
for (T o : objects) {
......@@ -316,7 +316,7 @@ public class JournalWriter<T> extends Journal<T> {
* Add an object to the end of the Journal.
*
* @param obj the object to add
* @throws com.nfsdb.journal.exceptions.JournalException if there is an error
* @throws com.nfsdb.exceptions.JournalException if there is an error
*/
public void append(T obj) throws JournalException {
......@@ -380,7 +380,7 @@ public class JournalWriter<T> extends Journal<T> {
* this will always be rejected.
*
* @return max timestamp older then which append is impossible.
* @throws com.nfsdb.journal.exceptions.JournalException if journal cannot calculate timestamp.
* @throws com.nfsdb.exceptions.JournalException if journal cannot calculate timestamp.
*/
public long getAppendTimestampLo() throws JournalException {
if (appendTimestampLo == -1) {
......@@ -416,7 +416,7 @@ public class JournalWriter<T> extends Journal<T> {
}
public Partition<T> createPartition(Interval interval, int partitionIndex) throws JournalException {
Partition<T> result = new Partition<>(this, interval, partitionIndex, Journal.TX_LIMIT_EVAL, null).open();
Partition<T> result = new Partition<>(this, interval, partitionIndex, TX_LIMIT_EVAL, null).open();
partitions.add(result);
return result;
}
......@@ -425,7 +425,7 @@ public class JournalWriter<T> extends Journal<T> {
* Add objects to the end of the Journal.
*
* @param objects objects to add
* @throws com.nfsdb.journal.exceptions.JournalException if there is an error
* @throws com.nfsdb.exceptions.JournalException if there is an error
*/
@SafeVarargs
public final void append(T... objects) throws JournalException {
......@@ -438,7 +438,7 @@ public class JournalWriter<T> extends Journal<T> {
* Copy the objects corresponding to the specified ids to the end of the Journal.
*
* @param resultSet the global row ids
* @throws com.nfsdb.journal.exceptions.JournalException if there is an error
* @throws com.nfsdb.exceptions.JournalException if there is an error
*/
public void append(ResultSet<T> resultSet) throws JournalException {
if (isCompatible(resultSet.getJournal())) {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,11 +14,11 @@
* limitations under the License.
*/
package com.nfsdb.journal;
package com.nfsdb;
import com.nfsdb.journal.collections.DirectLongList;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.utils.Rows;
import com.nfsdb.collections.DirectLongList;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.utils.Rows;
public class OrderedResultSet<T> extends ResultSet<T> {
public OrderedResultSet(Journal<T> journal, DirectLongList rowIDs) {
......
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal;
package com.nfsdb;
import com.nfsdb.journal.utils.Interval;
import com.nfsdb.utils.Interval;
public abstract class OrderedResultSetBuilder<T> extends AbstractResultSetBuilder<T, OrderedResultSet<T>> {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,23 +14,23 @@
* limitations under the License.
*/
package com.nfsdb.journal;
import com.nfsdb.journal.column.*;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.journal.factory.configuration.ColumnMetadata;
import com.nfsdb.journal.factory.configuration.JournalMetadata;
import com.nfsdb.journal.index.KVIndex;
import com.nfsdb.journal.iterators.ConcurrentIterator;
import com.nfsdb.journal.iterators.PartitionBufferedIterator;
import com.nfsdb.journal.iterators.PartitionConcurrentIterator;
import com.nfsdb.journal.iterators.PartitionIterator;
import com.nfsdb.journal.logging.Logger;
import com.nfsdb.journal.utils.Checksum;
import com.nfsdb.journal.utils.Dates;
import com.nfsdb.journal.utils.Interval;
import com.nfsdb.journal.utils.Unsafe;
package com.nfsdb;
import com.nfsdb.column.*;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.exceptions.JournalRuntimeException;
import com.nfsdb.factory.configuration.ColumnMetadata;
import com.nfsdb.factory.configuration.JournalMetadata;
import com.nfsdb.index.KVIndex;
import com.nfsdb.iterators.ConcurrentIterator;
import com.nfsdb.iterators.PartitionBufferedIterator;
import com.nfsdb.iterators.PartitionConcurrentIterator;
import com.nfsdb.iterators.PartitionIterator;
import com.nfsdb.logging.Logger;
import com.nfsdb.utils.Checksum;
import com.nfsdb.utils.Dates;
import com.nfsdb.utils.Interval;
import com.nfsdb.utils.Unsafe;
import java.io.Closeable;
import java.io.File;
......@@ -328,7 +328,7 @@ public class Partition<T> implements Iterable<T>, Closeable {
* Rebuild the index of a column using the default keyCountHint and recordCountHint values.
*
* @param columnIndex the column index
* @throws com.nfsdb.journal.exceptions.JournalException if the operation fails
* @throws com.nfsdb.exceptions.JournalException if the operation fails
*/
public void rebuildIndex(int columnIndex) throws JournalException {
JournalMetadata<T> meta = journal.getMetadata();
......@@ -344,7 +344,7 @@ public class Partition<T> implements Iterable<T>, Closeable {
* @param columnIndex the column index
* @param keyCountHint the key count hint override
* @param recordCountHint the record count hint override
* @throws com.nfsdb.journal.exceptions.JournalException if the operation fails
* @throws com.nfsdb.exceptions.JournalException if the operation fails
*/
public void rebuildIndex(int columnIndex, int keyCountHint, int recordCountHint, int txCountHint) throws JournalException {
final long time = LOGGER.isInfoEnabled() ? System.nanoTime() : 0L;
......@@ -446,7 +446,6 @@ public class Partition<T> implements Iterable<T>, Closeable {
}
}
// TODO: rethink visibility
public void updateIndexes(long oldSize, long newSize) {
if (oldSize < newSize) {
try {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal;
package com.nfsdb;
/**
* Setting partition type on JournalKey to override default settings.
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,17 +14,17 @@
* limitations under the License.
*/
package com.nfsdb.journal;
import com.nfsdb.journal.collections.DirectLongList;
import com.nfsdb.journal.column.SymbolTable;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.iterators.ConcurrentIterator;
import com.nfsdb.journal.iterators.ResultSetBufferedIterator;
import com.nfsdb.journal.iterators.ResultSetConcurrentIterator;
import com.nfsdb.journal.iterators.ResultSetIterator;
import com.nfsdb.journal.utils.Rnd;
import com.nfsdb.journal.utils.Rows;
package com.nfsdb;
import com.nfsdb.collections.DirectLongList;
import com.nfsdb.column.SymbolTable;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.iterators.ConcurrentIterator;
import com.nfsdb.iterators.ResultSetBufferedIterator;
import com.nfsdb.iterators.ResultSetConcurrentIterator;
import com.nfsdb.iterators.ResultSetIterator;
import com.nfsdb.utils.Rnd;
import com.nfsdb.utils.Rows;
import java.util.Iterator;
......
......@@ -14,14 +14,14 @@
* limitations under the License.
*/
package com.nfsdb.journal;
package com.nfsdb;
import com.nfsdb.journal.concurrent.TimerCache;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.factory.configuration.JournalMetadata;
import com.nfsdb.journal.index.KVIndex;
import com.nfsdb.journal.logging.Logger;
import com.nfsdb.journal.utils.Dates;
import com.nfsdb.concurrent.TimerCache;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.factory.configuration.JournalMetadata;
import com.nfsdb.index.KVIndex;
import com.nfsdb.logging.Logger;
import com.nfsdb.utils.Dates;
import java.io.Closeable;
......
......@@ -14,12 +14,12 @@
* limitations under the License.
*/
package com.nfsdb.journal;
package com.nfsdb;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.locks.Lock;
import com.nfsdb.journal.locks.LockManager;
import com.nfsdb.journal.utils.Interval;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.locks.Lock;
import com.nfsdb.locks.LockManager;
import com.nfsdb.utils.Interval;
import java.io.File;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal;
package com.nfsdb;
import com.nfsdb.journal.collections.DirectLongList;
import com.nfsdb.collections.DirectLongList;
/**
* Unordered result set does not guarantee ROWIDs to be in ascending order.
......
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal;
package com.nfsdb;
import com.nfsdb.journal.utils.Interval;
import com.nfsdb.utils.Interval;
public abstract class UnorderedResultSetBuilder<T> extends AbstractResultSetBuilder<T, UnorderedResultSet<T>> {
......
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal.collections;
package com.nfsdb.collections;
import com.nfsdb.journal.utils.Unsafe;
import com.nfsdb.utils.Unsafe;
import java.io.Closeable;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal.collections;
package com.nfsdb.collections;
import com.nfsdb.journal.exceptions.JournalImmutableIteratorException;
import com.nfsdb.exceptions.JournalImmutableIteratorException;
import java.util.Iterator;
......
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal.collections;
package com.nfsdb.collections;
import com.nfsdb.journal.utils.Unsafe;
import com.nfsdb.utils.Unsafe;
public class DirectIntList extends AbstractDirectList {
......
......@@ -14,10 +14,10 @@
* limitations under the License.
*/
package com.nfsdb.journal.collections;
package com.nfsdb.collections;
import com.nfsdb.journal.utils.Rnd;
import com.nfsdb.journal.utils.Unsafe;
import com.nfsdb.utils.Rnd;
import com.nfsdb.utils.Unsafe;
public class DirectLongList extends AbstractDirectList {
/**
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.collections;
package com.nfsdb.collections;
import java.util.Iterator;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.collections;
package com.nfsdb.collections;
import java.util.Arrays;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.collections;
package com.nfsdb.collections;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.collections;
package com.nfsdb.collections;
import java.util.Arrays;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.collections;
package com.nfsdb.collections;
import java.util.Arrays;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.collections;
package com.nfsdb.collections;
import java.lang.reflect.Array;
......
......@@ -14,12 +14,12 @@
* limitations under the License.
*/
package com.nfsdb.journal.collections.mmap;
package com.nfsdb.collections.mmap;
import com.nfsdb.journal.collections.ObjIntHashMap;
import com.nfsdb.journal.column.ColumnType;
import com.nfsdb.journal.factory.configuration.ColumnMetadata;
import com.nfsdb.journal.lang.cst.impl.qry.RecordMetadata;
import com.nfsdb.collections.ObjIntHashMap;
import com.nfsdb.column.ColumnType;
import com.nfsdb.factory.configuration.ColumnMetadata;
import com.nfsdb.lang.cst.impl.qry.RecordMetadata;
import java.util.List;
......
......@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.nfsdb.journal.collections.mmap;
package com.nfsdb.collections.mmap;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.journal.lang.cst.impl.qry.AbstractRecord;
import com.nfsdb.journal.lang.cst.impl.qry.Record;
import com.nfsdb.journal.lang.cst.impl.qry.RecordMetadata;
import com.nfsdb.journal.utils.Unsafe;
import com.nfsdb.exceptions.JournalRuntimeException;
import com.nfsdb.lang.cst.impl.qry.AbstractRecord;
import com.nfsdb.lang.cst.impl.qry.Record;
import com.nfsdb.lang.cst.impl.qry.RecordMetadata;
import com.nfsdb.utils.Unsafe;
import java.io.InputStream;
import java.io.OutputStream;
......
......@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.nfsdb.journal.collections.mmap;
package com.nfsdb.collections.mmap;
import com.nfsdb.journal.collections.AbstractImmutableIterator;
import com.nfsdb.journal.lang.cst.impl.qry.Record;
import com.nfsdb.journal.lang.cst.impl.qry.RecordMetadata;
import com.nfsdb.journal.lang.cst.impl.qry.RecordSource;
import com.nfsdb.journal.utils.Unsafe;
import com.nfsdb.collections.AbstractImmutableIterator;
import com.nfsdb.lang.cst.impl.qry.Record;
import com.nfsdb.lang.cst.impl.qry.RecordMetadata;
import com.nfsdb.lang.cst.impl.qry.RecordSource;
import com.nfsdb.utils.Unsafe;
public class MapRecordSource extends AbstractImmutableIterator<Record> implements RecordSource<Record> {
private final MapRecord record;
......
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal.collections.mmap;
package com.nfsdb.collections.mmap;
import com.nfsdb.journal.utils.Unsafe;
import com.nfsdb.utils.Unsafe;
public class MapValues {
private final int valueOffsets[];
......
......@@ -14,17 +14,17 @@
* limitations under the License.
*/
package com.nfsdb.journal.collections.mmap;
import com.nfsdb.journal.collections.AbstractDirectList;
import com.nfsdb.journal.collections.DirectLongList;
import com.nfsdb.journal.collections.Primes;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.journal.factory.configuration.ColumnMetadata;
import com.nfsdb.journal.lang.cst.impl.qry.Record;
import com.nfsdb.journal.lang.cst.impl.qry.RecordSource;
import com.nfsdb.journal.utils.Hash;
import com.nfsdb.journal.utils.Unsafe;
package com.nfsdb.collections.mmap;
import com.nfsdb.collections.AbstractDirectList;
import com.nfsdb.collections.DirectLongList;
import com.nfsdb.collections.Primes;
import com.nfsdb.exceptions.JournalRuntimeException;
import com.nfsdb.factory.configuration.ColumnMetadata;
import com.nfsdb.lang.cst.impl.qry.Record;
import com.nfsdb.lang.cst.impl.qry.RecordSource;
import com.nfsdb.utils.Hash;
import com.nfsdb.utils.Unsafe;
import java.io.Closeable;
import java.util.ArrayList;
......
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal.column;
package com.nfsdb.column;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.exceptions.JournalException;
import java.io.Closeable;
import java.nio.ByteBuffer;
......@@ -25,6 +25,10 @@ public abstract class AbstractColumn implements Closeable {
final MappedFile mappedFile;
long txAppendOffset = -1;
AbstractColumn(MappedFile storage) {
this.mappedFile = storage;
}
public abstract void truncate(long size);
public void preCommit(long appendOffset) {
......@@ -65,8 +69,4 @@ public abstract class AbstractColumn implements Closeable {
public void compact() throws JournalException {
mappedFile.compact();
}
AbstractColumn(MappedFile storage) {
this.mappedFile = storage;
}
}
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal.column;
package com.nfsdb.column;
import com.nfsdb.journal.utils.ByteBuffers;
import com.nfsdb.utils.ByteBuffers;
import java.nio.MappedByteBuffer;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.column;
package com.nfsdb.column;
import java.nio.ByteBuffer;
......@@ -33,6 +33,11 @@ public enum ColumnType {
private final Class type;
private final int size;
ColumnType(Class type, int size) {
this.type = type;
this.size = size;
}
public boolean matches(Class type) {
return this.type == type;
}
......@@ -40,9 +45,4 @@ public enum ColumnType {
public int size() {
return size;
}
ColumnType(Class type, int size) {
this.type = type;
this.size = size;
}
}
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal.column;
package com.nfsdb.column;
import com.nfsdb.journal.utils.Unsafe;
import com.nfsdb.utils.Unsafe;
public class FixedColumn extends AbstractColumn {
final int width;
......
......@@ -14,11 +14,11 @@
* limitations under the License.
*/
package com.nfsdb.journal.column;
package com.nfsdb.column;
import com.nfsdb.journal.JournalMode;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.utils.Unsafe;
import com.nfsdb.JournalMode;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.utils.Unsafe;
import java.io.File;
......
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal.column;
package com.nfsdb.column;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.exceptions.JournalException;
import java.io.Closeable;
import java.nio.ByteBuffer;
......
......@@ -14,17 +14,17 @@
* limitations under the License.
*/
package com.nfsdb.journal.column;
import com.nfsdb.journal.JournalMode;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.exceptions.JournalNoSuchFileException;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.journal.logging.Logger;
import com.nfsdb.journal.utils.ByteBuffers;
import com.nfsdb.journal.utils.Files;
import com.nfsdb.journal.utils.Lists;
import com.nfsdb.journal.utils.Unsafe;
package com.nfsdb.column;
import com.nfsdb.JournalMode;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.exceptions.JournalNoSuchFileException;
import com.nfsdb.exceptions.JournalRuntimeException;
import com.nfsdb.logging.Logger;
import com.nfsdb.utils.ByteBuffers;
import com.nfsdb.utils.Files;
import com.nfsdb.utils.Lists;
import com.nfsdb.utils.Unsafe;
import sun.nio.ch.DirectBuffer;
import java.io.File;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,19 +14,19 @@
* limitations under the License.
*/
package com.nfsdb.journal.column;
import com.nfsdb.journal.JournalMode;
import com.nfsdb.journal.collections.AbstractImmutableIterator;
import com.nfsdb.journal.collections.ObjIntHashMap;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.exceptions.JournalInvalidSymbolValueException;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.journal.index.Cursor;
import com.nfsdb.journal.index.KVIndex;
import com.nfsdb.journal.utils.ByteBuffers;
import com.nfsdb.journal.utils.Checksum;
import com.nfsdb.journal.utils.Lists;
package com.nfsdb.column;
import com.nfsdb.JournalMode;
import com.nfsdb.collections.AbstractImmutableIterator;
import com.nfsdb.collections.ObjIntHashMap;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.exceptions.JournalInvalidSymbolValueException;
import com.nfsdb.exceptions.JournalRuntimeException;
import com.nfsdb.index.Cursor;
import com.nfsdb.index.KVIndex;
import com.nfsdb.utils.ByteBuffers;
import com.nfsdb.utils.Checksum;
import com.nfsdb.utils.Lists;
import java.io.Closeable;
import java.io.File;
......
......@@ -14,11 +14,11 @@
* limitations under the License.
*/
package com.nfsdb.journal.column;
package com.nfsdb.column;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.journal.utils.Unsafe;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.exceptions.JournalRuntimeException;
import com.nfsdb.utils.Unsafe;
import java.io.IOException;
import java.io.InputStream;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.concurrent;
package com.nfsdb.concurrent;
import org.jetbrains.annotations.NotNull;
......
......@@ -14,12 +14,12 @@
* limitations under the License.
*/
package com.nfsdb.journal.concurrent;
package com.nfsdb.concurrent;
import com.lmax.disruptor.BatchEventProcessor;
import com.lmax.disruptor.BlockingWaitStrategy;
import com.lmax.disruptor.RingBuffer;
import com.nfsdb.journal.JournalWriter;
import com.nfsdb.JournalWriter;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.concurrent;
package com.nfsdb.concurrent;
import com.lmax.disruptor.EventFactory;
......
......@@ -14,15 +14,15 @@
* limitations under the License.
*/
package com.nfsdb.journal.concurrent;
package com.nfsdb.concurrent;
import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.LifecycleAware;
import com.nfsdb.journal.JournalMode;
import com.nfsdb.journal.JournalWriter;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.journal.tx.TxLog;
import com.nfsdb.JournalMode;
import com.nfsdb.JournalWriter;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.exceptions.JournalRuntimeException;
import com.nfsdb.tx.TxLog;
class PartitionCleanerEventHandler implements EventHandler<PartitionCleanerEvent>, LifecycleAware {
private final JournalWriter writer;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.concurrent;
package com.nfsdb.concurrent;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.exceptions;
package com.nfsdb.exceptions;
public class JournalConfigurationException extends JournalRuntimeException {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.exceptions;
package com.nfsdb.exceptions;
public class JournalDisconnectedChannelException extends JournalNetworkException {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.exceptions;
package com.nfsdb.exceptions;
public class JournalException extends Exception {
public JournalException() {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.exceptions;
package com.nfsdb.exceptions;
public class JournalImmutableIteratorException extends JournalRuntimeException {
public JournalImmutableIteratorException() {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.exceptions;
package com.nfsdb.exceptions;
public class JournalInvalidSymbolValueException extends JournalRuntimeException {
......
......@@ -14,11 +14,11 @@
* limitations under the License.
*/
package com.nfsdb.journal.exceptions;
package com.nfsdb.exceptions;
import com.nfsdb.journal.factory.configuration.ColumnMetadata;
import com.nfsdb.journal.factory.configuration.JournalMetadata;
import com.nfsdb.journal.logging.Logger;
import com.nfsdb.factory.configuration.ColumnMetadata;
import com.nfsdb.factory.configuration.JournalMetadata;
import com.nfsdb.logging.Logger;
public class JournalMetadataException extends JournalException {
private static final Logger LOGGER = Logger.getLogger(JournalMetadataException.class);
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.exceptions;
package com.nfsdb.exceptions;
public class JournalNetworkException extends Exception {
public JournalNetworkException(String message) {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.exceptions;
package com.nfsdb.exceptions;
public class JournalNoSuchFileException extends JournalException {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.exceptions;
package com.nfsdb.exceptions;
public class JournalRuntimeException extends RuntimeException {
public JournalRuntimeException(String message, Object... args) {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.exceptions;
package com.nfsdb.exceptions;
public class JournalUnsupportedTypeException extends JournalRuntimeException {
public JournalUnsupportedTypeException(Enum type) {
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.export;
package com.nfsdb.export;
public interface CharSink {
CharSink put(char c);
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal.export;
package com.nfsdb.export;
import com.nfsdb.journal.utils.ByteBuffers;
import com.nfsdb.utils.ByteBuffers;
import java.io.IOException;
import java.nio.ByteBuffer;
......
......@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.nfsdb.journal.export;
package com.nfsdb.export;
import com.nfsdb.journal.lang.cst.impl.qry.Record;
import com.nfsdb.journal.lang.cst.impl.qry.RecordMetadata;
import com.nfsdb.journal.lang.cst.impl.qry.RecordSource;
import com.nfsdb.journal.utils.Dates;
import com.nfsdb.journal.utils.Numbers;
import com.nfsdb.lang.cst.impl.qry.Record;
import com.nfsdb.lang.cst.impl.qry.RecordMetadata;
import com.nfsdb.lang.cst.impl.qry.RecordSource;
import com.nfsdb.utils.Dates;
import com.nfsdb.utils.Numbers;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@SuppressFBWarnings({"SF_SWITCH_NO_DEFAULT"})
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.export;
package com.nfsdb.export;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.jetbrains.annotations.NotNull;
......
......@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory;
package com.nfsdb.factory;
import com.nfsdb.journal.*;
import com.nfsdb.journal.concurrent.TimerCache;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.factory.configuration.JournalConfiguration;
import com.nfsdb.journal.factory.configuration.JournalMetadata;
import com.nfsdb.*;
import com.nfsdb.concurrent.TimerCache;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.factory.configuration.JournalConfiguration;
import com.nfsdb.factory.configuration.JournalMetadata;
import java.io.Closeable;
import java.io.File;
......
......@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory;
package com.nfsdb.factory;
import com.nfsdb.journal.Journal;
import com.nfsdb.journal.JournalKey;
import com.nfsdb.journal.concurrent.TimerCache;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.factory.configuration.JournalConfiguration;
import com.nfsdb.Journal;
import com.nfsdb.JournalKey;
import com.nfsdb.concurrent.TimerCache;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.factory.configuration.JournalConfiguration;
import java.util.ArrayList;
import java.util.HashMap;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory;
package com.nfsdb.factory;
import com.nfsdb.journal.Journal;
import com.nfsdb.Journal;
public interface JournalClosingListener {
......
......@@ -14,18 +14,18 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory;
import com.nfsdb.journal.JournalBulkWriter;
import com.nfsdb.journal.JournalKey;
import com.nfsdb.journal.JournalWriter;
import com.nfsdb.journal.PartitionType;
import com.nfsdb.journal.concurrent.TimerCache;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.factory.configuration.JMetadataBuilder;
import com.nfsdb.journal.factory.configuration.JournalConfiguration;
import com.nfsdb.journal.factory.configuration.JournalConfigurationBuilder;
import com.nfsdb.journal.factory.configuration.JournalMetadata;
package com.nfsdb.factory;
import com.nfsdb.JournalBulkWriter;
import com.nfsdb.JournalKey;
import com.nfsdb.JournalWriter;
import com.nfsdb.PartitionType;
import com.nfsdb.concurrent.TimerCache;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.factory.configuration.JMetadataBuilder;
import com.nfsdb.factory.configuration.JournalConfiguration;
import com.nfsdb.factory.configuration.JournalConfigurationBuilder;
import com.nfsdb.factory.configuration.JournalMetadata;
import java.io.Closeable;
import java.io.File;
......
......@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory;
package com.nfsdb.factory;
import com.nfsdb.journal.concurrent.NamedDaemonThreadFactory;
import com.nfsdb.journal.concurrent.TimerCache;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.factory.configuration.JournalConfiguration;
import com.nfsdb.journal.logging.Logger;
import com.nfsdb.concurrent.NamedDaemonThreadFactory;
import com.nfsdb.concurrent.TimerCache;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.factory.configuration.JournalConfiguration;
import com.nfsdb.logging.Logger;
import java.io.Closeable;
import java.util.concurrent.ArrayBlockingQueue;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory;
package com.nfsdb.factory;
import com.nfsdb.journal.Journal;
import com.nfsdb.journal.JournalBulkReader;
import com.nfsdb.journal.JournalKey;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.factory.configuration.JournalConfiguration;
import com.nfsdb.Journal;
import com.nfsdb.JournalBulkReader;
import com.nfsdb.JournalKey;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.factory.configuration.JournalConfiguration;
import java.io.Closeable;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,14 +14,14 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory;
package com.nfsdb.factory;
import com.nfsdb.journal.JournalBulkWriter;
import com.nfsdb.journal.JournalKey;
import com.nfsdb.journal.JournalWriter;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.factory.configuration.JMetadataBuilder;
import com.nfsdb.journal.factory.configuration.JournalConfiguration;
import com.nfsdb.JournalBulkWriter;
import com.nfsdb.JournalKey;
import com.nfsdb.JournalWriter;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.factory.configuration.JMetadataBuilder;
import com.nfsdb.factory.configuration.JournalConfiguration;
public interface JournalWriterFactory {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
package com.nfsdb.factory.configuration;
public abstract class AbstractGenericMetadataBuilder {
protected final ColumnMetadata meta;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
package com.nfsdb.factory.configuration;
public abstract class AbstractMetadataBuilder<T> {
protected final ColumnMetadata meta;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
package com.nfsdb.factory.configuration;
public class BinaryBuilder<T> extends AbstractMetadataBuilder<T> {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,10 +14,10 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
package com.nfsdb.factory.configuration;
import com.nfsdb.journal.column.ColumnType;
import com.nfsdb.journal.column.HugeBuffer;
import com.nfsdb.column.ColumnType;
import com.nfsdb.column.HugeBuffer;
public class ColumnMetadata {
public String name;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
package com.nfsdb.factory.configuration;
public class Constants {
public static final String TEMP_DIRECTORY_PREFIX = "temp";
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
package com.nfsdb.factory.configuration;
import com.nfsdb.journal.column.ColumnType;
import com.nfsdb.column.ColumnType;
public class GenericBinaryBuilder extends AbstractGenericMetadataBuilder {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
package com.nfsdb.factory.configuration;
import com.nfsdb.journal.column.ColumnType;
import com.nfsdb.column.ColumnType;
public class GenericIntBuilder extends AbstractGenericMetadataBuilder {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
package com.nfsdb.factory.configuration;
import com.nfsdb.journal.column.ColumnType;
import com.nfsdb.column.ColumnType;
public class GenericStringBuilder extends AbstractGenericMetadataBuilder {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
package com.nfsdb.factory.configuration;
import com.nfsdb.journal.column.ColumnType;
import com.nfsdb.column.ColumnType;
public class GenericSymbolBuilder extends AbstractGenericMetadataBuilder {
public GenericSymbolBuilder(JournalStructure parent, ColumnMetadata meta) {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
package com.nfsdb.factory.configuration;
public class IntBuilder<T> extends AbstractMetadataBuilder<T> {
......
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
package com.nfsdb.factory.configuration;
import com.nfsdb.journal.PartitionType;
import com.nfsdb.PartitionType;
import java.io.File;
......
......@@ -14,10 +14,10 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
package com.nfsdb.factory.configuration;
import com.nfsdb.journal.JournalKey;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.JournalKey;
import com.nfsdb.exceptions.JournalException;
import java.io.File;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
package com.nfsdb.factory.configuration;
import com.nfsdb.journal.exceptions.JournalConfigurationException;
import com.nfsdb.exceptions.JournalConfigurationException;
import java.io.File;
import java.util.ArrayList;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,17 +14,17 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
import com.nfsdb.journal.JournalKey;
import com.nfsdb.journal.JournalMode;
import com.nfsdb.journal.column.HugeBuffer;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.exceptions.JournalMetadataException;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.journal.utils.Base64;
import com.nfsdb.journal.utils.Checksum;
import com.nfsdb.journal.utils.Files;
package com.nfsdb.factory.configuration;
import com.nfsdb.JournalKey;
import com.nfsdb.JournalMode;
import com.nfsdb.column.HugeBuffer;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.exceptions.JournalMetadataException;
import com.nfsdb.exceptions.JournalRuntimeException;
import com.nfsdb.utils.Base64;
import com.nfsdb.utils.Checksum;
import com.nfsdb.utils.Files;
import java.io.File;
import java.util.Map;
......
......@@ -14,12 +14,12 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
package com.nfsdb.factory.configuration;
import com.nfsdb.journal.JournalKey;
import com.nfsdb.journal.PartitionType;
import com.nfsdb.journal.column.HugeBuffer;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.JournalKey;
import com.nfsdb.PartitionType;
import com.nfsdb.column.HugeBuffer;
import com.nfsdb.exceptions.JournalRuntimeException;
import java.io.File;
......
......@@ -14,14 +14,14 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
import com.nfsdb.journal.PartitionType;
import com.nfsdb.journal.collections.ObjIntHashMap;
import com.nfsdb.journal.column.ColumnType;
import com.nfsdb.journal.exceptions.JournalConfigurationException;
import com.nfsdb.journal.utils.ByteBuffers;
import com.nfsdb.journal.utils.Unsafe;
package com.nfsdb.factory.configuration;
import com.nfsdb.PartitionType;
import com.nfsdb.collections.ObjIntHashMap;
import com.nfsdb.column.ColumnType;
import com.nfsdb.exceptions.JournalConfigurationException;
import com.nfsdb.utils.ByteBuffers;
import com.nfsdb.utils.Unsafe;
import java.io.File;
import java.lang.reflect.Constructor;
......
......@@ -14,16 +14,16 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
import com.nfsdb.journal.JournalKey;
import com.nfsdb.journal.PartitionType;
import com.nfsdb.journal.collections.ObjIntHashMap;
import com.nfsdb.journal.column.HugeBuffer;
import com.nfsdb.journal.exceptions.JournalConfigurationException;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.journal.utils.Base64;
import com.nfsdb.journal.utils.Checksum;
package com.nfsdb.factory.configuration;
import com.nfsdb.JournalKey;
import com.nfsdb.PartitionType;
import com.nfsdb.collections.ObjIntHashMap;
import com.nfsdb.column.HugeBuffer;
import com.nfsdb.exceptions.JournalConfigurationException;
import com.nfsdb.exceptions.JournalRuntimeException;
import com.nfsdb.utils.Base64;
import com.nfsdb.utils.Checksum;
import java.io.File;
import java.lang.reflect.Constructor;
......
......@@ -14,15 +14,15 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
import com.nfsdb.journal.PartitionType;
import com.nfsdb.journal.collections.ObjIntHashMap;
import com.nfsdb.journal.column.ColumnType;
import com.nfsdb.journal.exceptions.JournalConfigurationException;
import com.nfsdb.journal.logging.Logger;
import com.nfsdb.journal.utils.ByteBuffers;
import com.nfsdb.journal.utils.Unsafe;
package com.nfsdb.factory.configuration;
import com.nfsdb.PartitionType;
import com.nfsdb.collections.ObjIntHashMap;
import com.nfsdb.column.ColumnType;
import com.nfsdb.exceptions.JournalConfigurationException;
import com.nfsdb.logging.Logger;
import com.nfsdb.utils.ByteBuffers;
import com.nfsdb.utils.Unsafe;
import java.io.File;
import java.lang.reflect.Constructor;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
package com.nfsdb.factory.configuration;
public class StringBuilder<T> extends AbstractMetadataBuilder<T> {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,10 +14,10 @@
* limitations under the License.
*/
package com.nfsdb.journal.factory.configuration;
package com.nfsdb.factory.configuration;
import com.nfsdb.journal.column.ColumnType;
import com.nfsdb.journal.exceptions.JournalConfigurationException;
import com.nfsdb.column.ColumnType;
import com.nfsdb.exceptions.JournalConfigurationException;
public class SymbolBuilder<T> extends AbstractMetadataBuilder<T> {
public SymbolBuilder(JournalMetadataBuilder<T> parent, ColumnMetadata meta) {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.index;
package com.nfsdb.index;
public interface Cursor {
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,16 +14,16 @@
* limitations under the License.
*/
package com.nfsdb.journal.index;
package com.nfsdb.index;
import com.nfsdb.journal.JournalMode;
import com.nfsdb.journal.collections.DirectLongList;
import com.nfsdb.journal.column.MappedFileImpl;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.journal.utils.ByteBuffers;
import com.nfsdb.journal.utils.Files;
import com.nfsdb.journal.utils.Unsafe;
import com.nfsdb.JournalMode;
import com.nfsdb.collections.DirectLongList;
import com.nfsdb.column.MappedFileImpl;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.exceptions.JournalRuntimeException;
import com.nfsdb.utils.ByteBuffers;
import com.nfsdb.utils.Files;
import com.nfsdb.utils.Unsafe;
import java.io.Closeable;
import java.io.File;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,26 +14,31 @@
* limitations under the License.
*/
package com.nfsdb.journal.iterators;
package com.nfsdb.iterators;
import com.lmax.disruptor.*;
import com.nfsdb.journal.collections.AbstractImmutableIterator;
import com.nfsdb.journal.concurrent.NamedDaemonThreadFactory;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.collections.AbstractImmutableIterator;
import com.nfsdb.concurrent.NamedDaemonThreadFactory;
import com.nfsdb.exceptions.JournalRuntimeException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public abstract class AbstractConcurrentIterator<T> extends AbstractImmutableIterator<T> implements EventFactory<AbstractConcurrentIterator.Holder<T>>, ConcurrentIterator<T> {
private final ExecutorService service;
RingBuffer<Holder<T>> buffer;
SequenceBarrier barrier;
private final ExecutorService service;
private int bufferSize;
private Sequence sequence;
private long nextSequence;
private long availableSequence;
private boolean started = false;
AbstractConcurrentIterator(int bufferSize) {
this.bufferSize = bufferSize;
this.service = Executors.newCachedThreadPool(new NamedDaemonThreadFactory("jj-iterator", false));
}
@Override
public AbstractConcurrentIterator.Holder<T> newInstance() {
Holder<T> h = new Holder<>();
......@@ -103,9 +108,4 @@ public abstract class AbstractConcurrentIterator<T> extends AbstractImmutableIte
T object;
boolean hasNext;
}
AbstractConcurrentIterator(int bufferSize) {
this.bufferSize = bufferSize;
this.service = Executors.newCachedThreadPool(new NamedDaemonThreadFactory("jj-iterator", false));
}
}
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.iterators;
package com.nfsdb.iterators;
import java.io.Closeable;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,14 +14,14 @@
* limitations under the License.
*/
package com.nfsdb.journal.iterators;
package com.nfsdb.iterators;
import com.nfsdb.journal.Journal;
import com.nfsdb.journal.Partition;
import com.nfsdb.journal.collections.AbstractImmutableIterator;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.journal.utils.Rows;
import com.nfsdb.Journal;
import com.nfsdb.Partition;
import com.nfsdb.collections.AbstractImmutableIterator;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.exceptions.JournalRuntimeException;
import com.nfsdb.utils.Rows;
import java.util.List;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,12 +14,12 @@
* limitations under the License.
*/
package com.nfsdb.journal.iterators;
package com.nfsdb.iterators;
import com.nfsdb.journal.Journal;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.journal.utils.Rows;
import com.nfsdb.Journal;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.exceptions.JournalRuntimeException;
import com.nfsdb.utils.Rows;
import java.util.List;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,10 +14,10 @@
* limitations under the License.
*/
package com.nfsdb.journal.iterators;
package com.nfsdb.iterators;
import com.nfsdb.journal.Journal;
import com.nfsdb.journal.collections.ImmutableIterator;
import com.nfsdb.Journal;
import com.nfsdb.collections.ImmutableIterator;
public interface JournalIterator<T> extends ImmutableIterator<T> {
Journal<T> getJournal();
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.nfsdb.journal.iterators;
package com.nfsdb.iterators;
import com.nfsdb.journal.Journal;
import com.nfsdb.journal.collections.AbstractImmutableIterator;
import com.nfsdb.journal.exceptions.JournalException;
import com.nfsdb.journal.exceptions.JournalRuntimeException;
import com.nfsdb.journal.utils.Rows;
import com.nfsdb.Journal;
import com.nfsdb.collections.AbstractImmutableIterator;
import com.nfsdb.exceptions.JournalException;
import com.nfsdb.exceptions.JournalRuntimeException;
import com.nfsdb.utils.Rows;
import java.util.List;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.iterators;
package com.nfsdb.iterators;
public final class JournalIteratorRange {
final int partitionID;
......
/*
* Copyright (c) 2014. Vlad Ilyushchenko
* Copyright (c) 2014-2015. Vlad Ilyushchenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.nfsdb.journal.iterators;
package com.nfsdb.iterators;
public interface JournalPeekingIterator<T> extends JournalIterator<T>, PeekingIterator<T> {
}
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册