001
014
015 package com.liferay.portal.cluster;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019
020 import java.io.InputStream;
021 import java.io.OutputStream;
022
023 import org.jgroups.Address;
024 import org.jgroups.Message;
025 import org.jgroups.Receiver;
026 import org.jgroups.View;
027
028
031 public class BaseReceiver implements Receiver {
032
033 public void block() {
034 }
035
036 public void getState(OutputStream outputStream) throws Exception {
037 }
038
039 public View getView() {
040 return view;
041 }
042
043 public void receive(Message message) {
044 }
045
046 public void setState(InputStream inputStream) throws Exception {
047 }
048
049 public void suspect(Address address) {
050 }
051
052 public void unblock() {
053 }
054
055 public void viewAccepted(View view) {
056 if (_log.isInfoEnabled()) {
057 _log.info("Accepted view " + view);
058 }
059
060 this.view = view;
061 }
062
063 protected volatile View view;
064
065 private static Log _log = LogFactoryUtil.getLog(BaseReceiver.class);
066
067 }