Search in sources :

Example 1 with ShardCallable

use of com.liferay.portal.kernel.dao.shard.ShardCallable in project liferay-ide by liferay.

the class UserLocalServiceImpl method reindex.

protected void reindex(final User user) {
    final Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(User.class);
    Callable<Void> callable = new ShardCallable<Void>(user.getCompanyId()) {

        @Override
        protected Void doCall() throws Exception {
            indexer.reindex(user);
            return null;
        }
    };
    TransactionCommitCallbackRegistryUtil.registerCallback(callable);
}
Also used : Indexer(com.liferay.portal.kernel.search.Indexer) ShardCallable(com.liferay.portal.kernel.dao.shard.ShardCallable)

Aggregations

ShardCallable (com.liferay.portal.kernel.dao.shard.ShardCallable)1 Indexer (com.liferay.portal.kernel.search.Indexer)1