001
014
015 package com.liferay.portal.kernel.cluster;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.concurrent.NoticeableFuture;
020 import com.liferay.portal.kernel.util.MethodHandler;
021
022
025 @ProviderType
026 public interface ClusterMasterExecutor {
027
028 public void addClusterMasterTokenTransitionListener(
029 ClusterMasterTokenTransitionListener
030 clusterMasterTokenAcquisitionListener);
031
032 public <T> NoticeableFuture<T> executeOnMaster(MethodHandler methodHandler);
033
034 public boolean isEnabled();
035
036 public boolean isMaster();
037
038 public void removeClusterMasterTokenTransitionListener(
039 ClusterMasterTokenTransitionListener
040 clusterMasterTokenAcquisitionListener);
041
042 }