2021-01-30 20:16:14 +01:00
|
|
|
package it.cavallium.dbengine.database.collections;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
2021-04-03 19:09:06 +02:00
|
|
|
public interface JoinerBlocking<KEY, DB_VALUE, JOINED_VALUE> {
|
2021-01-30 20:16:14 +01:00
|
|
|
|
|
|
|
interface ValueGetterBlocking<KEY, VALUE> {
|
|
|
|
VALUE get(KEY key) throws IOException;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Warning! You must only join with immutable data to ensure data correctness.
|
|
|
|
* Good examples: message id, send date, ...
|
|
|
|
* Bad examples: message content, views, edited, ...
|
|
|
|
*/
|
2021-04-03 19:09:06 +02:00
|
|
|
JOINED_VALUE join(ValueGetterBlocking<KEY, DB_VALUE> dbValueGetter, DB_VALUE value) throws IOException;
|
2021-01-30 20:16:14 +01:00
|
|
|
|
|
|
|
}
|