Examples of ClusterConfig


Examples of org.apache.jackrabbit.core.config.ClusterConfig

     * Initialize this cluster node (overridable).
     *
     * @throws ClusterException if an error occurs
     */
    protected void init() throws ClusterException {
        ClusterConfig cc = clusterContext.getClusterConfig();
        clusterNodeId = cc.getId();
        syncDelay = cc.getSyncDelay();
        stopDelay = syncDelay * 2;

        try {
            journal = cc.getJournal(clusterContext.getNamespaceResolver());
            instanceRevision = journal.getInstanceRevision();
            journal.register(this);
            producer = journal.getProducer(PRODUCER_ID);
        } catch (RepositoryException e) {
            throw new ClusterException(
View Full Code Here

Examples of org.apache.jackrabbit.core.config.ClusterConfig

     * Initialize this cluster node (overridable).
     *
     * @throws ClusterException if an error occurs
     */
    protected void init() throws ClusterException {
        ClusterConfig cc = clusterContext.getClusterConfig();
        clusterNodeId = getClusterNodeId(cc.getId());
        syncDelay = cc.getSyncDelay();

        try {
            JournalConfig jc = cc.getJournalConfig();
            journal = (Journal) jc.newInstance();
            setRepositoryHome(journal, clusterContext.getRepositoryHome());
            journal.init(clusterNodeId, clusterContext.getNamespaceResolver());
            instanceRevision = journal.getInstanceRevision();
            journal.register(this);
View Full Code Here

Examples of org.apache.jackrabbit.core.config.ClusterConfig

     * Initialize this cluster node (overridable).
     *
     * @throws ClusterException if an error occurs
     */
    protected void init() throws ClusterException {
        ClusterConfig cc = clusterContext.getClusterConfig();
        clusterNodeId = cc.getId();
        syncDelay = cc.getSyncDelay();
        stopDelay = syncDelay * 2;

        try {
            journal = cc.getJournal(clusterContext.getNamespaceResolver());
            instanceRevision = journal.getInstanceRevision();
            journal.register(this);
            producer = journal.getProducer(PRODUCER_ID);
        } catch (RepositoryException e) {
            throw new ClusterException(
View Full Code Here

Examples of org.apache.jackrabbit.core.config.ClusterConfig

     * Initialize this cluster node (overridable).
     *
     * @throws ClusterException if an error occurs
     */
    protected void init() throws ClusterException {
        ClusterConfig cc = clusterContext.getClusterConfig();
        clusterNodeId = getClusterNodeId(cc.getId());
        syncDelay = cc.getSyncDelay();

        try {
            JournalConfig jc = cc.getJournalConfig();
            journal = (Journal) jc.newInstance();
            setRepositoryHome(journal, clusterContext.getRepositoryHome());
            journal.init(clusterNodeId, clusterContext.getNamespaceResolver());
            instanceRevision = journal.getInstanceRevision();
            journal.register(this);
View Full Code Here

Examples of org.apache.jackrabbit.core.config.ClusterConfig

    private ClusterNode createClusterNode(String id, ArrayList records)
            throws ClusterException {

        BeanConfig bc = new BeanConfig(MemoryJournal.class.getName(), new Properties());
        JournalConfig jc = new JournalConfig(bc);
        ClusterConfig cc = new ClusterConfig(id, SYNC_DELAY, jc);
        SimpleClusterContext context = new SimpleClusterContext(cc);

        ClusterNode clusterNode = new ClusterNode();
        clusterNode.init(context);
        if (records != null) {
View Full Code Here

Examples of org.robotninjas.barge.ClusterConfig

  public RaftApplication(int serverIndex, URI[] uris, File logDir) {
    this(serverIndex,uris,logDir, Collections.<StateTransitionListener>emptyList(),Collections.<RaftProtocolListener>emptyList());
  }

  public ResourceConfig makeResourceConfig() {
    ClusterConfig clusterConfig = HttpClusterConfig.from(new HttpReplica(uris[serverIndex]),
      remotes());

    if (!logDir.exists() && !logDir.mkdirs())
      logger.warn("failed to create directories for storing logs, bad things will happen");
View Full Code Here

Examples of org.sdnplatform.sync.internal.config.ClusterConfig

    })
    protected void doUpdateConfiguration()
            throws FloodlightModuleException {

        try {
            ClusterConfig oldConfig = clusterConfig;
            clusterConfig = clusterConfigProvider.getConfig();
            if (clusterConfig.equals(oldConfig)) return;

            logger.info("[{}] Updating sync configuration {}",
                        clusterConfig.getNode().getNodeId(),
                        clusterConfig);
            if (oldConfig.getNode() != null &&
                !clusterConfig.getNode().equals(oldConfig.getNode())) {
                logger.info("[{}] Local node configuration changed; restarting sync" +
                        "service", oldConfig.getNode().getNodeId());
                shutdown();
                startUp(null);
            }

            for (Node n : clusterConfig.getNodes()) {
                Node existing = oldConfig.getNode(n.getNodeId());
                if (existing != null && !n.equals(existing)) {
                    // we already had this node's configuration, but it's
                    // changed.  Disconnect from the node and let it
                    // reinitialize
                    logger.debug("[{}->{}] Configuration for node has changed",
                                 getLocalNodeId(), n.getNodeId());
                    rpcService.disconnectNode(n.getNodeId());
                }
            }
            for (Node n : oldConfig.getNodes()) {
                Node nn = clusterConfig.getNode(n.getNodeId());
                if (nn == null) {
                    // n is a node that doesn't appear in the new config
                    logger.debug("[{}->{}] Disconnecting deconfigured node",
                                 getLocalNodeId(), n.getNodeId());
View Full Code Here

Examples of org.voltdb.compiler.ClusterConfig

        File projectFile = VoltProjectBuilder.writeStringToTempFile(simpleProject);
        String projectPath = projectFile.getPath();

        VoltCompiler compiler = new VoltCompiler();
        ClusterConfig cluster_config = new ClusterConfig(1, 1, 0, "localhost");
        assertTrue(compiler.compile(projectPath, cluster_config,
                                    "testout.jar", System.out, null));

        // Now read the jar file back in and make sure that we can grab the
        // class file from it using JarClassLoader
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.