Refine search
public Object down(Event evt) { switch(evt.getType()) { case Event.SET_LOCAL_ADDRESS: case Event.VIEW_CHANGE: case Event.CONNECT: case Event.CONNECT_USE_FLUSH: case Event.CONNECT_WITH_STATE_TRANSFER: case Event.CONNECT_WITH_STATE_TRANSFER_USE_FLUSH: case Event.DISCONNECT: return null; // don't propagate further down, this is only important for the main stack } return down_prot.down(evt); }
public Object down(Event evt) { switch(evt.getType()) { handleViewChange(evt.getArg()); break; StateTransferInfo info=evt.getArg(); if(info.target == null) { target=determineCoordinator(); up_prot.up(new Event(Event.GET_STATE_OK, new StateTransferInfo())); down_prot.down(state_req); Map<String,Object> config=evt.getArg(); if(config != null && config.containsKey("flush_supported")) { flushProtocolInStack=true; return down_prot.down(evt); // pass on to the layer below us
public Object down(Event evt) { switch(evt.getType()) { handleViewChange(evt.getArg()); break; StateTransferInfo info=evt.getArg(); Address target=info.target; up_prot.up(new Event(Event.STATE_TRANSFER_INPUTSTREAM_CLOSED, new StateTransferResult())); .setFlag(Message.Flag.SKIP_BARRIER, Message.Flag.DONT_BUNDLE, Message.Flag.OOB); log.debug("%s: asking %s for state", local_addr, target); down_prot.down(state_req); handleConfig(evt.getArg()); break; return down_prot.down(evt); // pass on to the layer below us
/** * If event is a message, if it is fragmented, re-assemble fragments into big message and pass up the stack. */ public Object up(Event evt) { switch(evt.getType()) { case Event.VIEW_CHANGE: handleViewChange(evt.getArg()); break; } return up_prot.up(evt); // Pass up to the layer above us by default }
/** * An event is to be sent down the stack. The layer may want to examine its type and perform * some action on it, depending on the event's type. If the event is a message MSG, then * the layer may need to add a header to it (or do nothing at all) before sending it down * the stack using {@code down_prot.down()}. In case of a GET_ADDRESS event (which tries to * retrieve the stack's address from one of the bottom layers), the layer may need to send * a new response event back up the stack using {@code up_prot.up()}. */ public Object down(Event evt) { if(evt.getType() == Event.SET_LOCAL_ADDRESS) local_addr=evt.getArg(); return down_prot.down(evt); }
/** * If event is a message, if it is fragmented, re-assemble fragments into big message and pass up the stack. */ public Object up(Event evt) { switch(evt.getType()) { case Event.VIEW_CHANGE: handleViewChange(evt.getArg()); break; } return up_prot.up(evt); // Pass up to the layer above us by default }
public Object down(Event evt) { switch(evt.getType()) { case Event.VIEW_CHANGE: Object retval=down_prot.down(evt); // Start keyserver socket in SSL_KEY_EXCHANGE, for instance handleView(evt.getArg()); return retval; case Event.SET_LOCAL_ADDRESS: local_addr=evt.getArg(); break; } return down_prot.down(evt); }
/** * Fragment a packet if larger than frag_size (add a header). Otherwise just pass down. Only * add a header if framentation is needed ! */ public Object down(Event evt) { switch(evt.getType()) { case Event.VIEW_CHANGE: handleViewChange(evt.getArg()); break; } return down_prot.down(evt); // Pass on to the layer below us }