use of org.killbill.billing.util.cache.CacheLoaderArgument in project killbill by killbill.
the class DefaultImmutableAccountInternalApi method createImmutableAccountCacheLoaderArgument.
private CacheLoaderArgument createImmutableAccountCacheLoaderArgument(final InternalTenantContext context) {
final LoaderCallback loaderCallback = new LoaderCallback() {
@Override
public Object loadAccount(final Long recordId, final InternalTenantContext context) {
final Account account = getAccountByRecordIdInternal(recordId, context);
return account != null ? new DefaultImmutableAccountData(account) : null;
}
};
final Object[] args = { loaderCallback };
return new CacheLoaderArgument(null, args, context);
}
Aggregations