Example usage for com.liferay.portal.kernel.cluster ClusterableInvokerUtil invokeOnCluster

List of usage examples for com.liferay.portal.kernel.cluster ClusterableInvokerUtil invokeOnCluster

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.cluster ClusterableInvokerUtil invokeOnCluster.

Prototype

public static void invokeOnCluster(Class<? extends ClusterInvokeAcceptor> clusterInvokeAcceptorClass,
            Object targetObject, Method method, Object[] arguments) throws Throwable 

Source Link

Usage

From source file:com.liferay.journal.util.impl.JournalContentImpl.java

License:Open Source License

@Override
public void clearCache(long groupId, String articleId, String ddmTemplateKey) {

    _portalCacheIndexer.removeKeys(JournalContentKeyIndexEncoder.encode(groupId, articleId, ddmTemplateKey));

    if (ClusterInvokeThreadLocal.isEnabled()) {
        try {/* w w  w .j  a  va2  s .com*/
            ClusterableInvokerUtil.invokeOnCluster(ClusterInvokeAcceptor.class, this, _clearCacheMethod,
                    new Object[] { groupId, articleId, ddmTemplateKey });
        } catch (Throwable t) {
            ReflectionUtil.throwException(t);
        }
    }
}