有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

JavaRMI调用语义

我有以下接口:

public interface Account extends Remote {
    public void deposit (double amount)
        throws java.rmi.RemoteException;
    public void withdraw (double amount) 
        throws java.rmi.RemoteException;
    public double getBalance()
        throws java.rmi.RemoteException;
    public void setBalance(double balance)
        throws java.rmi.RemoteException;
}

public interface Branch extends Remote {
    public void create (String name)
        throws java.rmi.RemoteException;
    public void lookup (String name)
        throws java.rmi.RemoteException;
    public double branchTotal()
        throws java.rmi.RemoteException;
}

RMI提供了三种调用语义:可能语义至少一次语义最多一次语义。基于这3种语义,我需要在提到的接口(AccountBranch)中更改什么


共 (1) 个答案

  1. # 1 楼答案

    RMI provides three invocation semantics: Maybe semantics, At-least-once semantics, At-most-once semantics.

    不,它没有。Java RMI最多只提供一次调用语义。这适用于RMI/JRMP、RMI/IIOP和RMI/JERI。不能代表别人说话

    Based on these 3 semantics, what would I need to change in the mentioned interfaces (Account and Branch)?

    没什么。根本无法更改调用语义