File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
commons/src/main/java/org/archive/bdb Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 2121import com .esotericsoftware .kryo .Kryo ;
2222import com .esotericsoftware .kryo .io .Input ;
2323import com .esotericsoftware .kryo .io .Output ;
24+ import com .esotericsoftware .kryo .serializers .DefaultSerializers ;
2425import com .esotericsoftware .kryo .util .Pool ;
2526import com .sleepycat .bind .EntryBinding ;
2627import com .sleepycat .je .DatabaseEntry ;
2728
29+ import java .util .concurrent .atomic .AtomicInteger ;
30+
2831/**
2932 * Binding for use with BerkeleyDB-JE that uses Kryo serialization rather
3033 * than BDB's (custom version of) Java serialization.
@@ -39,6 +42,7 @@ public class KryoBinding<K> implements EntryBinding<K> {
3942 Pool <AutoKryo > kryoPool = new Pool <AutoKryo >(true , false , POOL_SIZE ) {
4043 protected AutoKryo create () {
4144 AutoKryo kryo = new AutoKryo ();
45+ kryo .addDefaultSerializer (AtomicInteger .class , DefaultSerializers .AtomicIntegerSerializer .class );
4246 kryo .autoregister (baseClass );
4347 kryo .setRegistrationRequired (false );
4448 kryo .setWarnUnregisteredClasses (true );
You can’t perform that action at this time.
0 commit comments