public void materialiseABuiltProduct() { System.out.println("In the Director's materialiseABuiltProduct..."); if (builder == null) throw new IllegalStateException("No builder set"); builder.buildPartA(); builder.buildPartB(); builder.buildPartC(); }
protected Shard(AbstractBuilder<?, ?> builder) { super( builder.getId().toString(), builder.getPeerAddresses(), Optional.of(builder.getDatastoreContext().getShardRaftConfig()), DataStoreVersions.CURRENT_VERSION); this.name = builder.getId().toString(); this.datastoreContext = builder.getDatastoreContext(); this.restoreFromSnapshot = builder.getRestoreFromSnapshot(); setPersistence(datastoreContext.isPersistent()); LOG.info("Shard created : {}, persistent : {}", name, datastoreContext.isPersistent()); store = new ShardDataTree(builder.getSchemaContext(), builder.getTreeType()); shardMBean = ShardMBeanFactory.getShardStatsMBean( name.toString(), datastoreContext.getDataStoreMXBeanType()); shardMBean.setShard(this); if (isMetricsCaptureEnabled()) { getContext().become(new MeteringBehavior(this)); } commitCoordinator = new ShardCommitCoordinator( store, datastoreContext.getShardCommitQueueExpiryTimeoutInMillis(), datastoreContext.getShardTransactionCommitQueueCapacity(), LOG, this.name); setTransactionCommitTimeout(); // create a notifier actor for each cluster member roleChangeNotifier = createRoleChangeNotifier(name.toString()); appendEntriesReplyTracker = new MessageTracker( AppendEntriesReply.class, getRaftActorContext().getConfigParams().getIsolatedCheckIntervalInMillis()); transactionActorFactory = new ShardTransactionActorFactory( store, datastoreContext, new Dispatchers(context().system().dispatchers()) .getDispatcherPath(Dispatchers.DispatcherType.Transaction), self(), getContext(), shardMBean); snapshotCohort = new ShardSnapshotCohort(transactionActorFactory, store, LOG, this.name); messageRetrySupport = new ShardTransactionMessageRetrySupport(this); }
/** * Build the sub component if there is anything to document. * * @param node the XML element that specifies which components to document. * @param contentTree content tree to which the documentation will be added */ @Override public void build(XMLNode node, Content contentTree) { if (hasMembersToDocument()) { super.build(node, contentTree); } }
/** {@inheritDoc} */ @Override public void init(final AbstractBuilder parentBuilder, final EnvCommand cmd) { super.init(parentBuilder, new NodeWithChildsImpl(), endingTokenId); }
/** * Constructor with arguments for shorter non-reflection instantiation. * * @param parentBuilder The parent builder. * @param endingTokenId The token ending this builder or {@link Token#NONE}. */ public NodeBuilder(final AbstractBuilder parentBuilder, final Token endingTokenId) { super(); super.init(parentBuilder, new NodeWithChildsImpl(), endingTokenId); }