public String getLstSmsSetWithBigMessageCountState() { if (this.lstSmsSetWithBigMessageCount.size() == 0) return null; try { StringBuilder sb = new StringBuilder(); for (FastMap.Entry<String, SmsSet> n = this.lstSmsSetWithBigMessageCount.head(), end = this.lstSmsSetWithBigMessageCount .tail(); (n = n.getNext()) != end && n != null;) { SmsSet smsSet = n.getValue(); sb.append(smsSet.getTargetId()); sb.append(" - "); sb.append(smsSet.getSmsCount()); sb.append(" - "); sb.append(smsSet.getSmsCountWithoutDelivered()); sb.append("\n"); } return sb.toString(); } catch (Throwable e) { return "Exception when getLstSmsSetWithBigMessageCountState() = " + e.getMessage(); } }
SmsSetCache.getInstance().registerSmsSetWithBigMessageCount(this.getTargetId(), this);
try { synchronized (lock) { SmsSet smsSet2 = SmsSetCache.getInstance().getProcessingSmsSet(smsSet.getTargetId()); if (smsSet2 != null) { if (smsSet2.getLastUpdateTime().after(timeOutDate)) { logger.warn("Timeout of SmsSet in ProcessingSmsSet: targetId=" + smsSet2.getTargetId() + ", messageCount=" + smsSet2.getSmsCount()); smsSet2 = smsSet; SmsSetCache.getInstance().addProcessingSmsSet(smsSet2.getTargetId(), smsSet2, processingSmsSetTimeout); SmsSetCache.getInstance().addProcessingSmsSet(smsSet2.getTargetId(), smsSet2, processingSmsSetTimeout);
SmsSet smsSet2 = null; try { smsSet2 = res.get(smsSet.getTargetId()); } catch (Throwable e) { int dd = 0; res.put(smsSet.getTargetId(), smsSet); SmsSet smsSet2; synchronized (lock) { smsSet2 = SmsSetCache.getInstance().getProcessingSmsSet(smsSet.getTargetId()); if (smsSet2 != null) { if (smsSet2.getLastUpdateTime().after(timeOutDate)) { logger.warn("Timeout of SmsSet in ProcessingSmsSet: targetId=" + smsSet2.getTargetId() + ", messageCount=" + smsSet2.getSmsCount()); smsSet2 = smsSet; SmsSetCache.getInstance().addProcessingSmsSet(smsSet2.getTargetId(), smsSet2, processingSmsSetTimeout); SmsSetCache.getInstance().addProcessingSmsSet(smsSet2.getTargetId(), smsSet2, processingSmsSetTimeout);
if (destType == null || destType == SmType.SMS_FOR_SS7) { for (PreparedStatementCollection psc : lstPsc) { dueSlot = this.c2_getDueSlotForTargetId(psc, sms.getSmsSet().getTargetId()); if (dueSlot != 0) break; this.c2_updateDueSlotForTargetId_WithTableCleaning(sms.getSmsSet().getTargetId(), dueSlot); if (dueSlot2 != dueSlot) { dueSlot = dueSlot2; this.c2_updateDueSlotForTargetId_WithTableCleaning(sms.getSmsSet().getTargetId(), dueSlot); this.c2_updateDueSlotForTargetId_WithTableCleaning(sms.getSmsSet().getTargetId(), dueSlot); logger.warn("5 retries of c2_scheduleMessage fails for targetId=" + sms.getSmsSet().getTargetId());
targetId = sms.getTargetIdOnDeliveryStart(); } else { targetId = sms.getSmsSet().getTargetId();
/** * scheduler a message for a predefined dueSlot (for a next schedule time) */ public void c2_scheduleMessage_NewDueSlot(Sms sms, long dueSlot, ArrayList<Sms> lstFailured, boolean fastStoreAndForwordMode) throws PersistenceException { if (sms.getStoringAfterFailure()) { // the first store in ForwardAndStore mode - we store with other // messages to this sms.setStored(true); c2_scheduleMessage_ReschedDueSlot(sms, fastStoreAndForwordMode, dueSlot, lstFailured, true); } else { if (sms.getStored()) { if (fastStoreAndForwordMode) { dueSlot = c2_checkDueSlotWritingPossibility(dueSlot); } this.c2_updateInSystem(sms, DBOperations.IN_SYSTEM_SENT, fastStoreAndForwordMode); this.c2_updateDueSlotForTargetId_WithTableCleaning(sms.getSmsSet().getTargetId(), dueSlot); this.do_scheduleMessage(sms, dueSlot, lstFailured, fastStoreAndForwordMode, true); } else { if (lstFailured != null) lstFailured.add(sms); } } }
smsSet0.setNetworkId(networkId); SmsSet smsSet1 = SmsSetCache.getInstance().getProcessingSmsSet(smsSet0.getTargetId()); if (smsSet1 != null) { dueSlot = pers.c2_getDueSlotForTargetId(smsSet0.getTargetId()); try { if (dueSlot != 0 && dueSlot > pers.c2_getCurrentDueSlot()) { SmsSet smsSet = pers.c2_getRecordListForTargeId(dueSlot, smsSet0.getTargetId()); if (smsSet != null) { if (logger.isInfoEnabled()) {
boolean addedPacket1) throws PersistenceException { boundStatement.setUUID(Schema.COLUMN_ID, sms.getDbId()); boundStatement.setString(Schema.COLUMN_TARGET_ID, sms.getSmsSet().getTargetId()); if (addedNetworkId) { boundStatement.setInt(Schema.COLUMN_NETWORK_ID, sms.getSmsSet().getNetworkId());