Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Bela Ban
file 149 lines (86 sloc) 5.607 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148

API changes in 3.0.0
====================

- Old and deprecated system properties such as bind.address (instead of jgroups.bind_addr) have been removed

- Removed package org.jgroups.persistence and changed dependent demos accordingly (e.g. ReplicatedHashMap)

- Removed all options (JChannel.getOpt()/setOpt()), discarding of own messages can now be set via setDiscardOwnMessages(true)

- Removed package org.jgroups.mux (e.g. Multiplexer and MuxChannel). Use a shared transport instead. If you have to,
  use classes from package org.jgroups.blocks.mux (only if you're an expert though !)

- Removed (J)ChannelFactory. Inject the channel yourself, e.g. through CDI

- Removed JChannel.receive(). Use a Receiver or ReceiverAdapter and JChannel.setReceiver(Receiver) to switch from a
  pull based approach of receiving messages to a push based approach

- Removed JChannel.receive(), peek(), shutdown(), open(), returnState(), getAllStates(), blockOK()

- Removed DistributedQueue

- Removed PullPushAdapter. Use a Receiver to get callbacks on messages, views etc

- Removed DistributedLockManager. Use LockService as replacement

- Removed NotificationBus. Use a normal JChannel as replacement

- Removed deprecated methods in MessageDispatcher and RpcDispatcher

- Removed JChannel.getLocalAddress(). Use JChannel.getAddress() instead

- Removed NAKACK.use_stats_for_retransmission

- Removed deprecated methods and classes

- Removed VIEW_SYNC: not needed anymore, as MERGE2 covers the functionality of merging different views into one

- Removed Discovery.num_ping_requests

- Streamable:
  - DataInputStream --> DataInput, DataOutputStream --> DataOutput
  - readFrom() and writeTo() only throw Exception now

- RpcDispatcher: merged Marshaller and Marshaller2 into Marshaller interface

- MessageDispatcher: handle(Message) now throws Exception rather than Throwable

- Removed partial state transfer (nobody ever used it !)

- Removed ExtendedXXXAdapters: there is only Receiver, ReceiverAdapter, MessageListener and MembershipListener
- Moved ExtendedMembershipListener.unblock() into MembershipListener, removed ExtendedMembershipListener

- Changed Request.GET_ALL/GET_FIRST/GET_NONE etc from an int to ResponseMode.GET_ALL etc

- Removed ProtocolTester (use SHARED_LOOPBACK instead)

- Removed Address.isMulticastAddress(): a null address is a multicast address

- Removed use of Serializable / Externalizable whenever possible

- Removed TCPPING.return_entire_cache. See https://issues.jboss.org/browse/JGRP-1315 for details.

- Rsp, RspList, RpcDispatcher.callRemoteMethodsXXX() and MessageDispatcher.cast/sendXXX() methods now use
  generics, so the code below:

  RspList rsps=disp.callRemoteMethods(null, call, new RequestOptions(ResponseMode.GET_ALL, 5000));
  for(Map.Entry<Address,Rsp> rsp: rsps.entrySet())
      System.out.println(rsp.getKey() + ": " + rsp.getValue().getValue());

  has to be changed to:

  RspList<Date> rsps=disp.callRemoteMethods(null, call, new RequestOptions(ResponseMode.GET_ALL, 5000));
  for(Map.Entry<Address,Rsp<Date>> rsp: rsps.entrySet())
      System.out.println(rsp.getKey() + ": " + rsp.getValue().getValue());

- RpcDispatcher.callRemoteMethod() now throws an exception if the target method threw an exception

- RpcDispatcher.callRemoteMethods() return a RspList. If a member P threw an exception, then the Rsp for
  P will have it in the field 'exception'. The 'result' field is *not* used for exceptions any longer !

  An example to check for exceptions is:


  Multicast:

  RspList<Long> rsps=dispatcher.callRemoteMethods(null, "foo", null, null, new RequestOptions(...));
  for(Rsp<Long> rsp: rsps.values) {
     if(rsp.getException() != null) {
         // we have an exception
     }
     else {
         Long val=rsp.getValue();
         // do something with the value
     }
  }

  Unicast:

  try {
     Rsp<Long> rsp=disp.callRemoteMethod(target, "foo", null, null, new RequestOptions(...));
     Long val=rsp.getValue();
     // do something with the return value
  }
  catch(Throwable t) {
     // "foo" threw an exception
  }

- In MessageDispatcher, sendMessage(), sendMessageWithFuture(), castMessage() and castMessageWithFuture() now
  throw an exception (used to be a Throwable, or nothing)

- In RpcDispatcher, callRemoteMethod(), callRemoteMethodWithFuture(), callRemoteMethods() and callRemoteMethodsWithFuture()
  methods now throw an exception
- Ditto for MuxRpcDispatcher, MuxMessageDispatcher.

- ChannelNotConnectedException and ChannelClosedException have been replaced by IllegalStateException. This way,
  new exceptions can be thrown (and documented in the javadoc) without having to change the signature in the future.
  These changes affect mainly JChannel

- ChannelException has been replaced by Exception in all signatures

- State transfer API changes:
  ---------------------------
  - Removed byte[] getState() and void setState(byte[] data) callbacks in MessageListener and Receiver. Use the callbacks
    which use input and output streams instead
  - JChannel.getState() now returns void instead of boolean
  - The getState(OutputStream) and setState(InputStream) callbacks now throw Exception; any exception on the state
    provider will get sent back to the requester and will be re-thrown
  - STREAMING_STATE_TRANSFER has been separated into 2 protocols (sharing a common superclass): STATE and STATE_SOCK.
    STATE uses the transport of the stack in which it resides, to transfer state; STATE_SOCK creates a TCP connection
    to which a state requester connects to fetch the state.

  















Something went wrong with that request. Please try again.