Merge pull request #5843 from JLLeitschuh/feat/JLL/improve_kryo_support

[Java] Fix Kryo FP & Kryo 5 Support
This commit is contained in:
Anders Schack-Mulligen
2021-05-12 09:52:24 +02:00
committed by GitHub
8 changed files with 194 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
package com.esotericsoftware.kryo.pool;
import com.esotericsoftware.kryo.Kryo;
public interface KryoCallback<T> {
T execute (Kryo kryo);
}

View File

@@ -0,0 +1,7 @@
package com.esotericsoftware.kryo.pool;
import com.esotericsoftware.kryo.Kryo;
public interface KryoFactory {
Kryo create ();
}

View File

@@ -0,0 +1,30 @@
package com.esotericsoftware.kryo.pool;
import com.esotericsoftware.kryo.Kryo;
import java.util.Queue;
public interface KryoPool {
Kryo borrow ();
void release (Kryo kryo);
<T> T run (KryoCallback<T> callback);
static class Builder {
public Builder (KryoFactory factory) {
}
public Builder queue (Queue<Kryo> queue) {
return null;
}
public Builder softReferences () {
return null;
}
public KryoPool build () {
return null;
}
}
}