/** * Creates a new HATarget. * * @param partition the {@link HAPartition} for the service's cluster * @param replicantName the name of the service * @param target the service's {@link #getReplicantList() replicant} * @param allowInvocations <code>true</code> if {@link #invocationsAllowed()} * should return <code>true</code> immediately; * <code>false</code> if not * @throws Exception */ public HATarget(HAPartition partition, String replicantName, Serializable target, int allowInvocations) throws Exception { this.replicantName = replicantName; this.target = target; setInvocationsAuthorization (allowInvocations); updateHAPartition(partition); }