This project has retired. For details please refer to its Attic page.
Source code
001/**
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *   http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied.  See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019package org.apache.reef.wake.remote;
020
021import org.apache.reef.tang.annotations.Name;
022import org.apache.reef.tang.annotations.NamedParameter;
023import org.apache.reef.wake.EventHandler;
024import org.apache.reef.wake.remote.impl.ObjectSerializableCodec;
025
026/**
027 * Configuration options and helper methods for Wake remoting.
028 */
029public final class RemoteConfiguration {
030
031  @NamedParameter(short_name = "rm_name", doc = "The name of the remote manager.", default_value = "REEF_CLIENT")
032  public static final class ManagerName implements Name<String> {
033    // Intentionally empty
034  }
035
036  @NamedParameter(short_name = "rm_host", doc = "The host address to be used for messages.", default_value = "##UNKNOWN##")
037  public static final class HostAddress implements Name<String> {
038    // Intentionally empty
039  }
040
041  @NamedParameter(short_name = "rm_port", doc = "The port to be used for messages.", default_value = "0")
042  public static final class Port implements Name<Integer> {
043    // Intentionally empty
044  }
045
046  @NamedParameter(doc = "The codec to be used for messages.", default_class = ObjectSerializableCodec.class)
047  public static final class MessageCodec implements Name<Codec<?>> {
048    // Intentionally empty
049  }
050
051  @NamedParameter(doc = "The event handler to be used for throwables", default_class = DefaultErrorHandler.class)
052  public static final class ErrorHandler implements Name<EventHandler<Throwable>> {
053    // Intentionally empty
054  }
055
056  @NamedParameter(short_name = "rm_order",
057      doc = "Whether or not to use the message ordering guarantee", default_value = "true")
058  public static final class OrderingGuarantee implements Name<Boolean> {
059    // Intentionally empty
060  }
061
062  @NamedParameter(doc = "The number of tries", default_value = "3")
063  public static final class NumberOfTries implements Name<Integer> {
064    // Intentionally empty    
065  }
066
067  @NamedParameter(doc = "The timeout of connection retrying", default_value = "10000")
068  public static final class RetryTimeout implements Name<Integer> {
069    // Intentionally empty       
070  }
071}