Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2011, Red Hat, Inc. and individual contributors
* Copyright 2022-2023, Mobius Software LTD. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.restcomm.cluster;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.transaction.TransactionManager;
import org.restcomm.cluster.data.ClusterOperation;
import org.restcomm.cluster.data.TreePutIfAbsentResult;
import org.restcomm.cluster.data.TreeSegment;
/**
*
* @author martins
* @author András Kőkuti
* @author yulian.oifa
*
*/
public interface RestcommCluster {
public static final String CONNECTED_CLIENT="--m--";
/**
* Adds the specified fail over listener.
* @param listener
*/
public boolean addFailOverListener(FailOverListener listener);
/**
* Removes the specified fail over listener.
* @param listener
* @return boolean
*/
public boolean removeFailOverListener(FailOverListener listener);
/**
* Adds the specified data removal listener.
* @param listener
*/
public boolean addDataRemovalListener(DataRemovalListener listener);
/**
* Removes the specified data removal listener.
* @param listener
* @return boolean
*/
public boolean removeDataRemovalListener(DataRemovalListener listener);
/**
* Adds the specified data listener.
* @param listener
* @return boolean
*/
public boolean addDataListener(DataListener listener);
/**
* Removes the specified data listener.
* @param listener
* @return boolean
*/
public boolean removeDataListener(DataListener listener);
/**
* Retrieves the local address of the cluster node.
* @return String
*/
public String getLocalAddress();
/**
* Indicates if the cache is not in a cluster environment.
*
* @return boolean the localMode
*/
public boolean isLocalMode();
/**
* Method to determine if this node is single node in the cluster.
*
* @return
*
true - cache mode is local || clusterMembers == 1
*
*
false - otherwise
*
*
*/
public boolean isSingleMember();
/**
* Starts the cluster. This should only be invoked when all listeners are
* added, and when all classes needed to deserialize data in a running
* cluster are visible (somehow).
*/
public void startCluster(Boolean useRemovalOnlyListener);
/**
* Indicates if the cluster is running or not.
* @return boolean
*/
public boolean isStarted();
/**
* Stops the cluster.
*/
public void stopCluster();
/**
* Retreived cached value from cache.
* @return Object
*/
public Object treeGet(TreeSegment> key,Boolean ignoreRollbackState);
/**
* Retreived cached value from cache.
*/
public void treeGetAsync(TreeSegment> key,AsyncCacheCallback