mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Merge pull request #5843 from JLLeitschuh/feat/JLL/improve_kryo_support
[Java] Fix Kryo FP & Kryo 5 Support
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package com.esotericsoftware.kryo.pool;
|
||||
|
||||
import com.esotericsoftware.kryo.Kryo;
|
||||
|
||||
public interface KryoCallback<T> {
|
||||
T execute (Kryo kryo);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.esotericsoftware.kryo.pool;
|
||||
|
||||
import com.esotericsoftware.kryo.Kryo;
|
||||
|
||||
public interface KryoFactory {
|
||||
Kryo create ();
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user