Thursday
Feb212013
SquidIsDirty
- Determines if the data displayed in SQUID is up to date.
Prototype
int SquidIsDirty(int iSquid, char* sParam);
- Parameters
iSquid Squid Connection Handle sParam String containing the name of the column
- Return Values
0 SQUID is up to date 1 SQUID is dirty, not all data has been written to SQUID -1 Error occurred, call SquidGetLastError for details
Example
// SquidSendData 10000 times, wrapped in SquidPause/SquidResume calls and
// calling SquidRefresh every 1000 sends.
int iSquid;
lr_load_dll("SQUID-REST.dll");
iSquid = SquidConnect("http://localhost:8000");
SquidPause (iSquid, "col");
for (i=1; i<=10000; i++)
{
if (i==5000)
{
lr_output_message("dirty=%d", SquidIsDirty(iSquid,"col"));
}
sprintf (strBuffer, "LR-SEND3-%03d-%05d", iVuserId, i);
SquidSendData (iSquid, "col", strBuffer);
if (i % 1000 == 0)
{
SquidRefresh (iSquid, "col");
}
if (i==5000)
{
lr_output_message("dirty=%ld", SquidIsDirty(iSquid,"col"));
}
}
SquidResume (iSquid, "col");
SquidDisconnect(iSquid);