Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organized imports, updated dependencies #1054

Open
wants to merge 1 commit into
base: release-3.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@
<java.source.version>1.8</java.source.version>

<!--eclipse collections-->
<ec.version>[7.0.0,10.10.90)</ec.version>
<guava.version>[15.0,)</guava.version>
<ec.version>[11.0.0,)</ec.version>
<guava.version>[30.0,)</guava.version>
<lz4.version>[1.8.0,)</lz4.version>

<elsa.version>3.0.0-M5</elsa.version>

Expand Down Expand Up @@ -82,9 +83,9 @@
</dependency>

<dependency>
<groupId>net.jpountz.lz4</groupId>
<artifactId>lz4</artifactId>
<version>1.3.0</version>
<groupId>org.lz4</groupId>
<artifactId>lz4-java</artifactId>
<version>${lz4.version}</version>
</dependency>

<dependency>
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/org/mapdb/Atomic.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
*/
package org.mapdb;

import java.io.DataInput;
import java.io.IOException;

/**
* <p>
* A small toolkit of classes that support lock-free thread-safe
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/mapdb/DBMaker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package org.mapdb

import org.mapdb.volume.*
import java.io.File
import java.lang.ref.WeakReference


/**
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/org/mapdb/DataIO.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
package org.mapdb;

import org.jetbrains.annotations.NotNull;

import java.io.*;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.util.Arrays;

import static java.lang.Long.rotateLeft;

/**
* Various IO classes and utilities..
*/
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/mapdb/HTreeMap.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import org.eclipse.collections.api.map.primitive.MutableLongLongMap
import org.eclipse.collections.impl.set.mutable.primitive.LongHashSet
import java.io.Closeable
import java.security.SecureRandom

import java.util.*
import java.util.concurrent.*
import java.util.concurrent.ConcurrentMap
import java.util.concurrent.ScheduledExecutorService
import java.util.concurrent.TimeUnit
import java.util.concurrent.locks.ReadWriteLock
import java.util.function.BiConsumer

Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/mapdb/IndexTreeListJava.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.mapdb;

import org.jetbrains.annotations.NotNull;

import java.io.IOException;
import java.util.Arrays;

Expand Down
21 changes: 11 additions & 10 deletions src/main/java/org/mapdb/IndexTreeLongLongMap.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.mapdb

import org.eclipse.collections.api.LazyIterable
import org.eclipse.collections.api.LazyLongIterable
import org.eclipse.collections.api.LongIterable
import org.eclipse.collections.api.RichIterable
Expand All @@ -11,7 +12,6 @@ import org.eclipse.collections.api.block.predicate.primitive.LongPredicate
import org.eclipse.collections.api.block.procedure.Procedure
import org.eclipse.collections.api.block.procedure.primitive.LongLongProcedure
import org.eclipse.collections.api.block.procedure.primitive.LongProcedure
import org.eclipse.collections.api.collection.MutableCollection
import org.eclipse.collections.api.collection.primitive.ImmutableLongCollection
import org.eclipse.collections.api.collection.primitive.MutableLongCollection
import org.eclipse.collections.api.iterator.MutableLongIterator
Expand All @@ -30,10 +30,9 @@ import org.eclipse.collections.impl.factory.primitive.LongLongMaps
import org.eclipse.collections.impl.factory.primitive.LongSets
import org.eclipse.collections.impl.lazy.AbstractLazyIterable
import org.eclipse.collections.impl.lazy.primitive.LazyLongIterableAdapter
import org.eclipse.collections.impl.list.mutable.ArrayListAdapter
import org.eclipse.collections.impl.list.mutable.primitive.LongArrayList
import org.eclipse.collections.impl.map.mutable.primitive.LongLongHashMap
import org.eclipse.collections.impl.primitive.AbstractLongIterable
import org.eclipse.collections.impl.set.mutable.primitive.BoxedMutableLongSet
import org.eclipse.collections.impl.set.mutable.primitive.LongHashSet
import org.eclipse.collections.impl.set.mutable.primitive.SynchronizedLongSet
import org.eclipse.collections.impl.set.mutable.primitive.UnmodifiableLongSet
Expand Down Expand Up @@ -110,9 +109,9 @@ public class IndexTreeLongLongMap(

override fun containsValue(value: Long): Boolean {
//TODO perf
return treeFold(rootRecid, store, levels, false, TreeTraverseCallback { k, v, b: Boolean ->
return treeFold(rootRecid, store, levels, false) { k, v, b: Boolean ->
b || v == value
})
}
}


Expand Down Expand Up @@ -611,6 +610,13 @@ public class IndexTreeLongLongMap(
return [email protected]()
}

override fun boxed(): MutableSet<Long> {
return BoxedMutableLongSet(this)
}

override fun cartesianProduct(set: LongSet?): LazyIterable<LongLongPair> {
return LongSets.cartesianProduct<Any, Any>(this, set)
}
}

override fun keySet(): MutableLongSet {
Expand Down Expand Up @@ -823,7 +829,6 @@ internal abstract open class AbstractMutableLongCollection :
LongIterableIterate.appendString(this, appendable, start, separator, end)
}


override fun toArray(): LongArray? {
var ret = LongArray(32)
var pos = 0;
Expand Down Expand Up @@ -897,8 +902,6 @@ internal abstract open class AbstractMutableLongCollection :
return ret
}



override fun add(element: Long): Boolean {
throw UnsupportedOperationException("Cannot call add() on " + this.javaClass.simpleName)
}
Expand Down Expand Up @@ -927,7 +930,6 @@ internal abstract open class AbstractMutableLongCollection :
throw UnsupportedOperationException("Cannot call withoutAll() on " + this.javaClass.simpleName)
}


override fun equals(obj: Any?): Boolean {
if (this === obj) {
return true
Expand All @@ -938,7 +940,6 @@ internal abstract open class AbstractMutableLongCollection :
return this.size() == obj.size() && this.containsAll(obj)
}


override fun hashCode(): Int {
var ret = 0;
forEach{k->
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/mapdb/MapExtra.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.mapdb

import org.eclipse.collections.api.block.procedure.Procedure
import java.util.EventListener
import java.util.concurrent.ConcurrentMap
import java.util.concurrent.ConcurrentNavigableMap
import java.util.function.BiConsumer
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/mapdb/StoreWAL.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package org.mapdb
import org.eclipse.collections.impl.list.mutable.primitive.LongArrayList
import org.eclipse.collections.impl.map.mutable.primitive.LongLongHashMap
import org.eclipse.collections.impl.map.mutable.primitive.LongObjectHashMap
import org.mapdb.DataIO.*
import org.mapdb.StoreDirectJava.*
import org.mapdb.volume.ReadOnlyVolume
import org.mapdb.volume.SingleByteArrayVol
import org.mapdb.volume.Volume
import org.mapdb.volume.VolumeFactory
import org.mapdb.DataIO.*
import org.mapdb.StoreDirectJava.*
import java.io.File
import java.util.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;
import java.math.BigDecimal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;
import java.math.BigInteger;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/mapdb/serializer/SerializerBoolean.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;
import java.util.Arrays;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/mapdb/serializer/SerializerByte.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;

Expand Down
5 changes: 4 additions & 1 deletion src/main/java/org/mapdb/serializer/SerializerByteArray.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package org.mapdb.serializer;

import net.jpountz.xxhash.XXHash32;
import org.mapdb.*;
import org.mapdb.CC;
import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.mapdb.serializer;

import org.jetbrains.annotations.NotNull;
import static org.mapdb.serializer.SerializerStringDelta2.ByteArrayKeys;
import org.mapdb.DataIO;
import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
Expand All @@ -11,6 +10,8 @@
import java.util.Arrays;
import java.util.Comparator;

import static org.mapdb.serializer.SerializerStringDelta2.ByteArrayKeys;

/**
* Created by jan on 2/29/16.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import java.io.IOException;
import java.util.Arrays;
import java.util.Comparator;

/**
* Created by jan on 2/28/16.
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/mapdb/serializer/SerializerChar.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package org.mapdb.serializer;

import org.mapdb.*;
import org.mapdb.CC;
import org.mapdb.DBException;
import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;

import java.io.IOException;
import java.io.Serializable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package org.mapdb.serializer;

import org.mapdb.*;
import org.mapdb.CC;
import org.mapdb.DBException;
import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;

import java.io.IOException;
import java.io.Serializable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;
import java.util.Arrays;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/mapdb/serializer/SerializerFourByte.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;

Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/mapdb/serializer/SerializerIntArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;
import java.util.Arrays;
Expand Down
7 changes: 1 addition & 6 deletions src/main/java/org/mapdb/serializer/SerializerJava.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;

import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectStreamClass;
import java.io.OutputStream;
import java.io.*;

/**
* Created by jan on 2/28/16.
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/mapdb/serializer/SerializerShort.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;

Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/mapdb/serializer/SerializerString.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.jetbrains.annotations.NotNull;
import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.mapdb.serializer;

import org.mapdb.*;
import org.mapdb.DataIO;
import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.jetbrains.annotations.NotNull;
import org.mapdb.DataInput2;
import org.mapdb.DataOutput2;
import org.mapdb.Serializer;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import java.io.IOException;
import java.nio.charset.Charset;
import java.util.Comparator;

/**
* Created by jan on 2/28/16.
Expand Down
Loading