use of io.spine.server.tenant.TenantFunction in project core-java by SpineEventEngine.
the class InMemoryProjectionStorage method readLastHandledEventTime.
@Override
public Timestamp readLastHandledEventTime() {
final TenantFunction<Timestamp> func = new TenantFunction<Timestamp>(isMultitenant()) {
@Nullable
@Override
public Timestamp apply(@Nullable TenantId tenantId) {
checkNotNull(tenantId);
final Timestamp result = timestampOfLastEvent.get(tenantId);
return result;
}
};
return func.execute();
}
Aggregations