Package org.apache.jackrabbit.core.config

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();

        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


     * 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

     * 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();

        JournalConfig jc = cc.getJournalConfig();

        String revisionName = jc.getParameters().getProperty(REVISION_NAME);
        if (revisionName == null) {
            String msg = "Revision not specified.";
            throw new ClusterException(msg);
View Full Code Here

     * @throws Exception
     */
    public void testClusterIdGeneration() throws Exception {
        BeanConfig bc = new BeanConfig(MemoryJournal.class.getName(), new Properties());
        JournalConfig jc = new JournalConfig(bc);
        ClusterConfig cc = new ClusterConfig(null, 0, jc);
        SimpleClusterContext context = new SimpleClusterContext(cc, repositoryHome);

        ClusterNode clusterNode = new ClusterNode();
        clusterNode.init(context);

View Full Code Here

    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

        params.setProperty("directory", journalDirectory.getPath());

        BeanConfig bc = new BeanConfig(FileJournal.class.getName(), params);
        JournalConfig jc = new JournalConfig(bc);

        ClusterConfig cc = new ClusterConfig(CLUSTER_NODE_ID, SYNC_DELAY, jc);
        SimpleClusterContext context = new SimpleClusterContext(cc, repositoryHome);

        ClusterNode clusterNode = new ClusterNode();
        clusterNode.init(context);
View Full Code Here

        Properties params = new Properties();

        BeanConfig bc = new BeanConfig(Object.class.getName(), params);
        JournalConfig jc = new JournalConfig(bc);

        ClusterConfig cc = new ClusterConfig(CLUSTER_NODE_ID, SYNC_DELAY, jc);
        SimpleClusterContext context = new SimpleClusterContext(cc);

        ClusterNode clusterNode = new ClusterNode();

        try {
View Full Code Here

        Properties params = new Properties();

        BeanConfig bc = new BeanConfig(FileJournal.class.getName(), params);
        JournalConfig jc = new JournalConfig(bc);

        ClusterConfig cc = new ClusterConfig(CLUSTER_NODE_ID, SYNC_DELAY, jc);
        SimpleClusterContext context = new SimpleClusterContext(cc);

        ClusterNode clusterNode = new ClusterNode();

        try {
View Full Code Here

     * 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

     * 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 {
            journal = (Journal) cc.getJournalConfig().newInstance();
            journal.init(clusterNodeId, new SyncListener(), clusterContext.getNamespaceResovler());
        } catch (ConfigurationException e) {
            throw new ClusterException(e.getMessage(), e.getCause());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.config.ClusterConfig

Copyright © 2018 www.massapicom. 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.