Using queue specific variable(s) to efficiently delete expired items in an ordered queue without necessarily checking each queued item's expiry time
    1.
    发明授权
    Using queue specific variable(s) to efficiently delete expired items in an ordered queue without necessarily checking each queued item's expiry time 失效
    使用队列特定变量有效地删除有序队列中的过期项目,而不必检查每个排队的项目的到期时间

    公开(公告)号:US07487272B2

    公开(公告)日:2009-02-03

    申请号:US11281987

    申请日:2005-11-17

    IPC分类号: G06F7/00 G06F7/08

    CPC分类号: G06F7/785 G06F5/06

    摘要: 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.

    摘要翻译: 一种用于删除队列数据结构中的过期项目的方法,所述队列数据结构包括有序数据项的顺序列表,所述有序数据项包括所述顺序列表的一端的队列头和所述顺序列表的另一端的队列尾,其中每个数据 项目包括到期时间,该方法包括:产生对应于队列中第一项目到期时间与队列中第二项目到期时间之间的最大时间间隔的最大间隔值,其中第二项目更接近 队列头比第一项; 从队列头顺序扫描有序项目列表; 响应于确定扫描的项目已过期,删除所扫描的项目; 响应于确定扫描的项目将不会超过大于最大间隔值的时间间隔,终止对有序项目列表的扫描。