use of org.killbill.billing.util.cache.ImmutableAccountCacheLoader.LoaderCallback in project killbill by killbill.
the class DefaultImmutableAccountInternalApi method createImmutableAccountCacheLoaderArgument.
private CacheLoaderArgument createImmutableAccountCacheLoaderArgument(final InternalTenantContext context) {
final LoaderCallback loaderCallback = new LoaderCallback() {
@Override
public ImmutableAccountData 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