public class NN_DBOper
extends java.lang.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 java.util.Date |
slotOrigDate |
protected int |
slotSecondsTimeArea |
static java.lang.String |
TLV_SET |
| Modifier | Constructor and Description |
|---|---|
protected |
NN_DBOper() |
| Modifier and Type | Method and Description |
|---|---|
long |
calculateSlot(java.util.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(java.util.Date time)
Return due_slot for the given time
|
static NN_DBOper |
getInstance() |
long |
getNextDueSlotForTargetId(org.mobicents.smsc.tools.stresstool.NN_DBOper.PreparedStatementCollection3 psc,
java.lang.String targetId) |
long |
getProcessingDueSlot()
Return due_slop that SMSC is processing now
|
protected com.datastax.driver.core.Session |
getSession() |
SmsSet |
getSmsSetForTargetId(java.util.Date[] dtt,
NN_LoadedTargetId ti) |
org.mobicents.smsc.tools.stresstool.NN_DBOper.PreparedStatementCollection2 |
getStatementCollection(java.util.Date dt) |
long |
getStoringDueSlot()
Return due_slop for storing next incoming to SMSC message
|
protected java.lang.String |
getTableName(java.util.Date dt)
Generate a table name depending on date
|
protected java.lang.String |
getTableName(long dueSlot)
Generate a table name depending on long dueSlot
|
protected java.lang.String |
getTableName4(long dueSlot) |
java.util.List<NN_LoadedTargetId> |
getTargetIdListForDueSlot(java.util.Date[] dtt,
long dueSlot,
long newDueSlot,
int maxRecordCount) |
java.util.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(java.lang.String ip,
int port,
java.lang.String keyspace,
int dataTableDaysTimeArea,
int slotSecondsTimeArea) |
void |
stop() |
void |
unregisterDueSlotWriting(long dueSlot)
Registering that thread finishes writing to this due_slot
|
public static final java.lang.String TLV_SET
protected com.datastax.driver.core.Cluster cluster
protected com.datastax.driver.core.Session session
protected int dataTableDaysTimeArea
protected java.util.Date slotOrigDate
protected int slotSecondsTimeArea
public static NN_DBOper getInstance()
public boolean isStarted()
protected com.datastax.driver.core.Session getSession()
public void start(java.lang.String ip,
int port,
java.lang.String keyspace,
int dataTableDaysTimeArea,
int slotSecondsTimeArea)
throws java.lang.Exception
java.lang.Exceptionpublic void stop()
throws java.lang.Exception
java.lang.Exceptionpublic long calculateSlot(java.util.Date dt)
public void createRecord(long dueSlot,
Sms sms)
throws PersistenceException
PersistenceExceptionpublic java.util.List<NN_LoadedTargetId> getTargetIdListForDueSlot(java.util.Date[] dtt, long dueSlot, long newDueSlot, int maxRecordCount) throws PersistenceException
PersistenceExceptionpublic SmsSet getSmsSetForTargetId(java.util.Date[] dtt, NN_LoadedTargetId ti) throws PersistenceException
PersistenceExceptionpublic void deleteIdFromDests(Sms sms) throws PersistenceException
PersistenceExceptionpublic org.mobicents.smsc.tools.stresstool.NN_DBOper.PreparedStatementCollection2 getStatementCollection(java.util.Date dt)
throws PersistenceException
PersistenceExceptionpublic long getDueSlotForTime(java.util.Date time)
public java.util.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 java.lang.String getTableName(long dueSlot)
protected java.lang.String getTableName(java.util.Date dt)
protected java.lang.String getTableName4(long dueSlot)
public long getCurDueSlot()
throws PersistenceException
PersistenceExceptionpublic long getNextDueSlotForTargetId(org.mobicents.smsc.tools.stresstool.NN_DBOper.PreparedStatementCollection3 psc,
java.lang.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.