@Override public void doInTransactionWithoutResult(TransactionStatus arg0) { doNodeConfigChanged(op.getNodeId(),m_cp,true); } });
@Override public Map<String, String> getRuntimeAttributes() { return request.getRuntimeAttributes(); } };
/** {@inheritDoc} */ @Override public final ScheduledFuture<?> deleteNode(int nodeId) { AdapterOperation op = new AdapterOperation(Integer.valueOf(nodeId), AdapterOperationType.DELETE, createScheduleForNode(nodeId, AdapterOperationType.DELETE)); if (m_operationQueue.enqueOperation(nodeId, op)) { op.schedule(m_executorService, true); } else { //TODO: log something } return null; }
/** * Override this method to change the default schedule * @param adapterOperationType * @return */ AdapterOperationSchedule createScheduleForNode(int nodeId, AdapterOperationType adapterOperationType) { return new AdapterOperationSchedule(adapterOperationType); }
private static String getServiceName(ServiceDetectorFactory<? extends ServiceDetector> factory) { return factory.createDetector().getServiceName(); } }
public WsManAssetProvisioningAdapter() { super(NAME); // Set the default time delay to 30 seconds this.setDelay(30); this.setTimeUnit(TimeUnit.SECONDS); }
public SnmpAssetProvisioningAdapter() { super(NAME); // Set the default time delay to 300 seconds this.setDelay(300); this.setTimeUnit(TimeUnit.SECONDS); }
/** * <p>Constructor for SimpleQueuedProvisioningAdapter.</p> */ protected SimpleQueuedProvisioningAdapter() { this(createDefaultSchedulerService()); }
private static ServiceDetector createDetector(ServiceDetectorFactory<? extends ServiceDetector> factory, Map<String, String> properties) { if (factory == null) { return null; } final ServiceDetector detector = factory.createDetector(properties); return detector; }
/** * Override this method to change the default schedule * @param adapterOperationType * @return */ AdapterOperationSchedule createScheduleForNode(int nodeId, AdapterOperationType adapterOperationType) { return new AdapterOperationSchedule(); }
@Override public void doInTransactionWithoutResult(TransactionStatus arg0) { doNodeConfigChanged(op.getNodeId(),m_cp,true); } });
/** {@inheritDoc} */ @Override public final ScheduledFuture<?> nodeConfigChanged(int nodeId) { AdapterOperation op = new AdapterOperation(Integer.valueOf(nodeId), AdapterOperationType.CONFIG_CHANGE, createScheduleForNode(nodeId, AdapterOperationType.CONFIG_CHANGE)); if (m_operationQueue.enqueOperation(nodeId, op)) { op.schedule(m_executorService, true); } else { //TODO: log something } return null; }
/** {@inheritDoc} */ @Override public final ScheduledFuture<?> updateNode(int nodeId) { AdapterOperation op = new AdapterOperation(Integer.valueOf(nodeId), AdapterOperationType.UPDATE, createScheduleForNode(nodeId, AdapterOperationType.UPDATE)); if (m_operationQueue.enqueOperation(nodeId, op)) { return op.schedule(m_executorService, true); } else { //TODO: log something } return null; }