/**
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.activeblaze.group;

import java.util.List;


/**
 * A <CODE>Member</CODE> holds information about a member of the group
 * A Member has to be added to a group to interact with it
 */
public interface Member {

    /**
     * @return the name
     */
    public String getName();

    /**
     * @return the id
     */
    public String getId();


    /**
     * @return the startTime
     */
    public long getStartTime();

    /**
     * @return the timeStamp
     */
    long getTimeStamp();

    /**
     * Set the timestamp
     */
    void setTimeStamp(long value);

    /**
     * @return the inbox destination
     */
    public String getInBoxDestination();


    /**
     * This weight can be used to help select a master
     * in the cluster - the highest weight becomes the master
     *
     * @return the masterWeight
     */
    public long getMasterWeight();

    /**
     * If there is two members have the same master weight,
     * a secondary weight can be used
     *
     * @return refined weight
     */
    public long getRefinedMasterWeight();


    /**
     * Get an array of groups
     *
     * @return an array of groups
     */
    public List<String> getGroups();

}
