首页> 外国专利> Using queue specific variable(s) to efficiently delete expired items in an ordered queue without necessarily checking each queued item's expiry time

Using queue specific variable(s) to efficiently delete expired items in an ordered queue without necessarily checking each queued item's expiry time

机译:使用特定于队列的变量有效删除有序队列中的过期项目,而不必检查每个排队项目的到期时间

摘要

A method for deleting expired items in a queue data structure, the queue data structure comprising a sequential list of ordered data items including a queue head at one end of the sequential list and a queue tail at another end of the sequential list, wherein each data item includes an expiry time, the method comprising: generating a maximum interval value corresponding to a maximum time interval between an expiry time of a first item in the queue and an expiry time of a second item in the queue, wherein the second item is nearer the queue head than the first item; sequentially scanning the list of ordered items from the queue head; responsive to a determination that a scanned item is expired, deleting the scanned item; responsive to a determination that a scanned item will not expire for a time interval greater than the maximum interval value, terminating scanning of the list of ordered items.
机译:一种用于删除队列数据结构中过期项的方法,该队列数据结构包括有序数据项的顺序列表,该顺序数据项包括在顺序列表的一端的队列头和在顺序列表的另一端的队列尾,其中每个数据项包括到期时间,该方法包括:生成与队列中的第一项的到期时间和队列中的第二项的到期时间之间的最大时间间隔相对应的最大间隔值,其中第二项更接近队列头比第一项高;从队列头顺序扫描已订购商品的列表;响应于确定扫描项目已过期,删除扫描项目;响应于确定所扫描的物品在大于最大间隔值的时间间隔内不会过期,从而终止对已订购物品列表的扫描。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号