CavalliumDBEngine/src/main/java/it/cavallium/dbengine/database/collections/JoinerBlocking.java

19 lines
534 B
Java
Raw Normal View History

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> {
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;
}