/** * Returns a copy of this configuration object. */ @Override public ReplicationConfig clone() { try { ReplicationConfig copy = (ReplicationConfig) super.clone(); copy.setRepNetConfig(getRepNetConfig().clone()); return copy; } catch (CloneNotSupportedException willNeverOccur) { return null; } }
private static ReplicationNetworkConfig makeRepNetConfig(File propFile) throws FileNotFoundException { if (propFile == null) { return ReplicationNetworkConfig.createDefault(); } return ReplicationNetworkConfig.create((propFile)); }
public static ReplicatedEnvironment createDetachedEnv(File envHome, ReplicationConfig repConfig, EnvironmentConfig envConfig) throws DatabaseException { return new ReplicatedEnvironment(envHome, repConfig, envConfig, null, QuorumPolicy.SIMPLE_MAJORITY, false, null); }
/** * Sets the name of the Java KeyStore file to be used when creating * SSL connections. * * @param filename the KeyStore filename * * @return this */ public ReplicationNetworkConfig setSSLKeyStore(String filename) { setSSLKeyStoreVoid(filename); return this; }
/** * For internal use only. * @hidden */ @Override public OperationFailureException wrapSelf(String msg) { return new UnknownMasterException(msg, this); } }
/** * For internal use only. * @hidden */ @Override public MasterStateException wrapSelf(String msg) { return new MasterStateException(msg, this); } }
/** * Creates a default ReplicationNetworkConfig instance. * * @return an instance of a class derived from ReplicationNetworkConfig * as indicated by the channelType property default. */ public static ReplicationNetworkConfig createDefault() { return new ReplicationBasicConfig(); }
/** * Set the replica commit timeout. * * @param replicaAckTimeout time in milliseconds * * @return this */ public ReplicationConfig setReplicaAckTimeout(long replicaAckTimeout, TimeUnit unit) { setReplicaAckTimeoutVoid(replicaAckTimeout, unit); return this; }
/** * @hidden * * Sets the feeder authenticator. * * @param authenticator the feeder authenticator */ public ReplicationConfig setAuthenticator( final StreamAuthenticator authenticator) { setAuthenticatorVoid(authenticator); return this; }
@Override public String toString(){ return getName() + " permissibleLag=" + permissibleLag; } }
/** * For internal use only. * @hidden */ @Override public RollbackException wrapSelf(String msg) { return new RollbackException(msg, this); } }
/** * For internal use only. * @hidden */ protected StateChangeException(Locker locker, StateChangeEvent stateChangeEvent) { super(locker, (locker != null), makeMessage(locker, stateChangeEvent), null); this.stateChangeEvent = stateChangeEvent; }
/** * For internal use only. * @hidden */ public RollbackProhibitedException(String message, RollbackProhibitedException cause) { super(message + " " + cause.getMessage(), cause); this.searchResults = cause.searchResults; }
/** * For internal use only. * @hidden */ @Override public RollbackProhibitedException wrapSelf(String msg) { return new RollbackProhibitedException(msg, this); }
/** * For internal use only. * @hidden */ @Override public OperationFailureException wrapSelf(String msg) { return new ReplicaWriteException(msg, this); }
@Override public PropertyDescriptor[] getPropertyDescriptors() { return getPdescriptor(ReplicationBasicConfig.class); } }
/** * Arbiter configuration. * @param props to initialize configuration object. */ public ArbiterConfig(Properties props) { super(props); repNetConfig = ReplicationNetworkConfig.createDefault(); }
/** * Sets the list of SSL cipher suites that are acceptable * * @param cipherSuites a comma-delimited list of SSL cipher suites * * @return this */ public ReplicationNetworkConfig setSSLCipherSuites(String cipherSuites) { setSSLCipherSuitesVoid(cipherSuites); return this; }
/** * Returns a copy of this configuration object. */ @Override public ReplicationSSLConfig clone() { return (ReplicationSSLConfig) super.clone(); }
/** * @hidden * Ensure that the parameters for this and all known derived classes are * registered. This is called by testing code to ensure that parameter * registration happens when non-standard API access is used. */ public static void registerParams() { /* Call for side effect */ getRepNetPropertySet(); }