public class NN_DBOper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected com.datastax.driver.core.Cluster |
cluster |
protected int |
dataTableDaysTimeArea |
protected com.datastax.driver.core.Session |
session |
protected Date |
slotOrigDate |
protected int |
slotSecondsTimeArea |
static String |
TLV_SET |
| Modifier | Constructor and Description |
|---|---|
protected |
NN_DBOper() |
| Modifier and Type | Method and Description |
|---|---|
long |
calculateSlot(Date dt) |
void |
createRecord_sch2(Sms sms) |
void |
createRecord(long dueSlot,
Sms sms) |
protected Sms |
createSms(com.datastax.driver.core.Row row,
SmsSet smsSet) |
void |
deleteIdFromDests(Sms sms) |
long |
getCurDueSlot() |
long |
getDueSlotForTime(Date time)
Return due_slot for the given time
|
static NN_DBOper |
getInstance() |
long |
getNextDueSlotForTargetId(org.mobicents.smsc.tools.stresstool.NN_DBOper.PreparedStatementCollection3 psc,
String targetId) |
long |
getProcessingDueSlot()
Return due_slop that SMSC is processing now
|
protected com.datastax.driver.core.Session |
getSession() |
SmsSet |
getSmsSetForTargetId(Date[] dtt,
NN_LoadedTargetId ti) |
org.mobicents.smsc.tools.stresstool.NN_DBOper.PreparedStatementCollection2 |
getStatementCollection(Date dt) |
long |
getStoringDueSlot()
Return due_slop for storing next incoming to SMSC message
|
protected String |
getTableName(Date dt)
Generate a table name depending on date
|
protected String |
getTableName(long dueSlot)
Generate a table name depending on long dueSlot
|
protected String |
getTableName4(long dueSlot) |
List<NN_LoadedTargetId> |
getTargetIdListForDueSlot(Date[] dtt,
long dueSlot,
long newDueSlot,
int maxRecordCount) |
Date |
getTimeForDueSlot(long dueSlot)
Return time for the given due_slot
|
boolean |
isStarted() |
void |
registerDueSlotWriting(long dueSlot)
Registering that thread starts writing to this due_slot
|
void |
setProcessingDueSlot(long val)
Set a new due_slop that SMSC is processing now and store it to the database
|
void |
start(String ip,
int port,
String keyspace,
int dataTableDaysTimeArea,
int slotSecondsTimeArea) |
void |
stop() |
void |
unregisterDueSlotWriting(long dueSlot)
Registering that thread finishes writing to this due_slot
|
public static final String TLV_SET
protected com.datastax.driver.core.Cluster cluster
protected com.datastax.driver.core.Session session
protected int dataTableDaysTimeArea
protected Date slotOrigDate
protected int slotSecondsTimeArea
public static NN_DBOper getInstance()
public boolean isStarted()
protected com.datastax.driver.core.Session getSession()
public void start(String ip, int port, String keyspace, int dataTableDaysTimeArea, int slotSecondsTimeArea) throws Exception
Exceptionpublic long calculateSlot(Date dt)
public void createRecord(long dueSlot,
Sms sms)
throws PersistenceException
PersistenceExceptionpublic List<NN_LoadedTargetId> getTargetIdListForDueSlot(Date[] dtt, long dueSlot, long newDueSlot, int maxRecordCount) throws PersistenceException
PersistenceExceptionpublic SmsSet getSmsSetForTargetId(Date[] dtt, NN_LoadedTargetId ti) throws PersistenceException
PersistenceExceptionpublic void deleteIdFromDests(Sms sms) throws PersistenceException
PersistenceExceptionpublic org.mobicents.smsc.tools.stresstool.NN_DBOper.PreparedStatementCollection2 getStatementCollection(Date dt) throws PersistenceException
PersistenceExceptionpublic long getDueSlotForTime(Date time)
public Date getTimeForDueSlot(long dueSlot)
public long getProcessingDueSlot()
public void setProcessingDueSlot(long val)
public long getStoringDueSlot()
public void registerDueSlotWriting(long dueSlot)
public void unregisterDueSlotWriting(long dueSlot)
protected String getTableName(long dueSlot)
protected String getTableName4(long dueSlot)
public long getCurDueSlot()
throws PersistenceException
PersistenceExceptionpublic long getNextDueSlotForTargetId(org.mobicents.smsc.tools.stresstool.NN_DBOper.PreparedStatementCollection3 psc,
String targetId)
throws PersistenceException
PersistenceExceptionpublic void createRecord_sch2(Sms sms) throws PersistenceException
PersistenceExceptionprotected Sms createSms(com.datastax.driver.core.Row row, SmsSet smsSet) throws PersistenceException
PersistenceExceptionCopyright © 2017. All Rights Reserved.