@Override public Object clone() { final OtpErlangRef newRef = (OtpErlangRef) super.clone(); newRef.ids = ids.clone(); return newRef; } }
@Override public Object clone() { final OtpErlangBitstr that = (OtpErlangBitstr) super.clone(); that.bin = bin.clone(); that.pad_bits = pad_bits; return that; } }
@Override public Object clone() { final OtpErlangTuple newTuple = (OtpErlangTuple) super.clone(); newTuple.elems = elems.clone(); return newTuple; } }
@Override @SuppressWarnings("unchecked") public Object clone() { final OtpErlangMap newMap = (OtpErlangMap) super.clone(); newMap.map = (OtpMap) map.clone(); return newMap; } }
/** * Send a message to a named mailbox created from the same node as this * mailbox. * * @param aname * the registered name of recipient mailbox. * * @param msg * the body of the message to send. * */ public void send(final String aname, final OtpErlangObject msg) { home.deliver(new OtpMsg(self, aname, (OtpErlangObject) msg.clone())); }
/** * Send a message to a remote {@link OtpErlangPid pid}, representing either * another {@link OtpMbox mailbox} or an Erlang process. * * @param to * the {@link OtpErlangPid pid} identifying the intended * recipient of the message. * * @param msg * the body of the message to send. * */ public void send(final OtpErlangPid to, final OtpErlangObject msg) { try { final String node = to.node(); if (node.equals(home.node())) { home.deliver(new OtpMsg(to, (OtpErlangObject) msg.clone())); } else { final OtpCookedConnection conn = home.getConnection(node); if (conn == null) { return; } conn.send(self, to, msg); } } catch (final Exception e) { } }