Thursday
Feb212013

SquidPause

  • Pauses the updating of SQUID.
  • All SQUID calls will be cached until SquidResume or SquidRefresh is called.
  • If the column does not exist, it will be created.

Prototype

int SquidPause(int iSquid, char* sParam);

  • Parameters
iSquidSquid Connection Handle
sParamString containing the name of the column
  • Return Values
0Operation successful
-1Error 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);