/** * 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 = cc.getStopDelay(); try { journal = cc.getJournal(clusterContext.getNamespaceResolver()); instanceRevision = journal.getInstanceRevision(); journal.register(this); producer = journal.getProducer(PRODUCER_ID); } catch (RepositoryException e) { throw new ClusterException( "Cluster initialization failed: " + this, e); } catch (JournalException e) { throw new ClusterException( "Journal initialization failed: " + this, e); } }
/** * 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 = cc.getStopDelay(); try { journal = cc.getJournal(clusterContext.getNamespaceResolver()); instanceRevision = journal.getInstanceRevision(); journal.register(this); producer = journal.getProducer(PRODUCER_ID); } catch (RepositoryException e) { throw new ClusterException( "Cluster initialization failed: " + this, e); } catch (JournalException e) { throw new ClusterException( "Journal initialization failed: " + this, e); } }