/** * Creating a custom schedule for this adapter. We need to make sure that the node has a system object ID set * and that it has had enough time for that to have happened. * @param nodeId * @param adapterOperationType */ @Override AdapterOperationSchedule createScheduleForNode(int nodeId, AdapterOperationType adapterOperationType) { AdapterOperationSchedule aos = new AdapterOperationSchedule(m_delay, 60, 3, m_timeUnit); LOG.info("createScheduleForNode: Scheduling {} for nodeid {} with schedule: {}", adapterOperationType, nodeId, aos); return aos; }
/** * Creating a custom schedule for this adapter. We need to make sure that the node has a system object ID set * and that it has had enough time for that to have happened. * @param nodeId * @param adapterOperationType * @return */ @Override AdapterOperationSchedule createScheduleForNode(int nodeId, AdapterOperationType adapterOperationType) { AdapterOperationSchedule aos = new AdapterOperationSchedule(m_delay, 60, 3, m_timeUnit); LOG.info("createScheduleForNode: Scheduling {} for nodeid {} with schedule: {}", aos, adapterOperationType, nodeId); return aos; }
/** * Creating a custom schedule for this adapter. We need to make sure that the node has a system object ID set * and that it has had enough time for that to have happened. * @param nodeId * @param adapterOperationType * @return */ @Override AdapterOperationSchedule createScheduleForNode(int nodeId, AdapterOperationType adapterOperationType) { AdapterOperationSchedule aos = new AdapterOperationSchedule(m_delay, 60, 3, m_timeUnit); LOG.info("createScheduleForNode: Scheduling {} for nodeid {} with schedule: {}", aos, adapterOperationType, nodeId); return aos; }
@Override AdapterOperationSchedule createScheduleForNode(final int nodeId, AdapterOperationType adapterOperationType) { LOG.debug("Scheduling: {} for nodeid: {}", nodeId, adapterOperationType); if (adapterOperationType.equals(AdapterOperationType.CONFIG_CHANGE)) { updateRancidNodeState(nodeId, true); String ipaddress = m_onmsNodeIpMap.get(nodeId); //String ipaddress = (String) m_template.execute(new TransactionCallback() { // public Object doInTransaction(TransactionStatus arg0) { // return getSuitableIpForRancid(nodeId); // } //}); LOG.debug("Found Suitable ip address: {}", ipaddress); long initialDelay = m_rancidAdapterConfig.getDelay(ipaddress); int retries = m_rancidAdapterConfig.getRetries(ipaddress); LOG.debug("Setting initialDelay(sec): {}", initialDelay); LOG.debug("Setting retries(sec): {}", retries); return new AdapterOperationSchedule(initialDelay,60, retries, TimeUnit.SECONDS); } return new AdapterOperationSchedule(); }
@Override AdapterOperationSchedule createScheduleForNode(final int nodeId, AdapterOperationType adapterOperationType) { LOG.debug("Scheduling: {} for nodeid: {}", nodeId, adapterOperationType); if (adapterOperationType.equals(AdapterOperationType.CONFIG_CHANGE)) { updateRancidNodeState(nodeId, true); String ipaddress = m_onmsNodeIpMap.get(nodeId); //String ipaddress = (String) m_template.execute(new TransactionCallback() { // public Object doInTransaction(TransactionStatus arg0) { // return getSuitableIpForRancid(nodeId); // } //}); LOG.debug("Found Suitable ip address: {}", ipaddress); long initialDelay = m_rancidAdapterConfig.getDelay(ipaddress); int retries = m_rancidAdapterConfig.getRetries(ipaddress); LOG.debug("Setting initialDelay(sec): {}", initialDelay); LOG.debug("Setting retries(sec): {}", retries); return new AdapterOperationSchedule(initialDelay,60, retries, TimeUnit.SECONDS); } return new AdapterOperationSchedule(); }
@Override AdapterOperationSchedule createScheduleForNode(int nodeId, AdapterOperationType adapterOperationType) { return new AdapterOperationSchedule(m_delay, 0, 1, m_timeUnit); }
/** * Override this method to change the default schedule * @param adapterOperationType * @return */ AdapterOperationSchedule createScheduleForNode(int nodeId, AdapterOperationType adapterOperationType) { return new AdapterOperationSchedule(adapterOperationType); }