<commit_before>/* File:        $Id$
 * Revision:    $Revision$
 * Author:      $Author$
 * Date:        $Date$
 *
 * The Netarchive Suite - Software to harvest and preserve websites
 * Copyright 2004-2010 <NAME> and Statsbiblioteket, Denmark
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

package dk.netarkivet.common.distribute;

import java.util.Collection;

import org.mortbay.log.Log;

import dk.netarkivet.common.CommonSettings;
import dk.netarkivet.common.distribute.arcrepository.Replica;
import dk.netarkivet.common.distribute.arcrepository.ReplicaType;
import dk.netarkivet.common.exceptions.ArgumentNotValid;
import dk.netarkivet.common.exceptions.IllegalState;
import dk.netarkivet.common.exceptions.UnknownID;
import dk.netarkivet.common.utils.Settings;
import dk.netarkivet.harvester.harvesting.distribute.CrawlProgressMessage;
import dk.netarkivet.harvester.harvesting.distribute.FrontierReportMessage;

/**
 * This singleton class is in charge of giving out the correct channels.
 */

public class Channels {

   /**
    * Channel type prefixes for the current set of channels.
    */
    private static final String ALLBA_CHANNEL_PREFIX = "ALL_BA";
    private static final String ANYBA_CHANNEL_PREFIX = "ANY_BA";
    private static final String THEBAMON_CHANNEL_PREFIX = "THE_BAMON";
    private static final String THESCHED_CHANNEL_PREFIX = "THE_SCHED";
    private static final String THEREPOS_CHANNEL_PREFIX = "THE_REPOS";
    private static final String ANYLOWHACO_CHANNEL_PREFIX
        = "ANY_LOWPRIORITY_HACO";
    private static final String ANYHIGHHACO_CHANNEL_PREFIX
        = "ANY_HIGHPRIORITY_HACO";
    private static final String THISREPOSCLIENT_CHANNEL_PREFIX
        = "THIS_REPOS_CLIENT";
    private static final String ERROR_CHANNEL_PREFIX = "ERROR";
    private static final String INDEXSERVER_CHANNEL_PREFIX = "INDEX_SERVER";
    private static final String THISINDEXCLIENT_CHANNEL_PREFIX
        = "THIS_INDEX_CLIENT";
    private static final String MONITOR_CHANNEL_PREFIX = "MONITOR";

    /**
     * Prefix for the channel used to send {@link CrawlProgressMessage}s.
     */
    private static final String HARVEST_MONITOR_CHANNEL_PREFIX = "HARVESTMON";

    /**
     * Prefix for the channel used to send {@link FrontierReportMessage}s.
     */
    private static final String FRONTIER_MONITOR_CHANNEL_PREFIX = "FRONTIERMON";

    private static final String THECR_CHANNEL_PREFIX = "THE_CR";

    /** Channel part separator. */
    public static final String CHANNEL_PART_SEPARATOR = "_";

    /**<commit_msg>Remove imports from harvester module that is only used in javadoc anyway. Breaks the POC maven-2 build.<commit_after>/* File:        $Id$
 * Revision:    $Revision$
 * Author:      $Author$
 * Date:        $Date$
 *
 * The Netarchive Suite - Software to harvest and preserve websites
 * Copyright 2004-2010 <NAME>liotek and Statsbiblioteket, Denmark
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

package dk.netarkivet.common.distribute;

import java.util.Collection;

import org.mortbay.log.Log;

import dk.netarkivet.common.CommonSettings;
import dk.netarkivet.common.distribute.arcrepository.Replica;
import dk.netarkivet.common.distribute.arcrepository.ReplicaType;
import dk.netarkivet.common.exceptions.ArgumentNotValid;
import dk.netarkivet.common.exceptions.IllegalState;
import dk.netarkivet.common.exceptions.UnknownID;
import dk.netarkivet.common.utils.Settings;

/**
 * This singleton class is in charge of giving out the correct channels.
 */

public class Channels {

   /**
    * Channel type prefixes for the current set of channels.
    */
    private static final String ALLBA_CHANNEL_PREFIX = "ALL_BA";
    private static final String ANYBA_CHANNEL_PREFIX = "ANY_BA";
    private static final String THEBAMON_CHANNEL_PREFIX = "THE_BAMON";
    private static final String THESCHED_CHANNEL_PREFIX = "THE_SCHED";
    private static final String THEREPOS_CHANNEL_PREFIX = "THE_REPOS";
    private static final String ANYLOWHACO_CHANNEL_PREFIX
        = "ANY_LOWPRIORITY_HACO";
    private static final String ANYHIGHHACO_CHANNEL_PREFIX
        = "ANY_HIGHPRIORITY_HACO";
    private static final String THISREPOSCLIENT_CHANNEL_PREFIX
        = "THIS_REPOS_CLIENT";
    private static final String ERROR_CHANNEL_PREFIX = "ERROR";
    private static final String INDEXSERVER_CHANNEL_PREFIX = "INDEX_SERVER";
    private static final String THISINDEXCLIENT_CHANNEL_PREFIX
        = "THIS_INDEX_CLIENT";
    private static final String MONITOR_CHANNEL_PREFIX = "MONITOR";

    /**
     * Prefix for the channel used to send {@link dk.netarkivet.harvester.harvesting.
     * distribute.CrawlProgressMessage}s.
     */
    private static final String HARVEST_MONITOR_CHANNEL_PREFIX = "HARVESTMON";

    /**
     * Prefix for the channel used to send {@link dk.netarkivet.harvester.harvesting.
     * distribute.FrontierReportMessage}s.
     */
    private static final String FRONTIER_MONITOR_CHANNEL_PREFIX = "FRONTIERMON";

    private static final String THECR_CHANNEL_PREFIX = "THE_CR";

    /** Channel part separator. */
    public static final String CHANNEL_PART_SEPARATOR = "_";

    /**
{'fraction_non_alphanumeric': 0.07119987803018753, 'fraction_numerical': 0.006555877420338466, 'mean_word_length': 4.053929121725732, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1881954', 'n_tokens_mistral': 1931, 'n_tokens_neox': 1876, 'n_words': 622}