Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » extending ExpiringCache with IsChanged
extending ExpiringCache with IsChanged [message #1770480] Sat, 12 August 2017 09:59 Go to next message
Marcel Verpaalen is currently offline Marcel VerpaalenFriend
Messages: 59
Registered: September 2014
Member
Hi,
I'm using the ExpiringCache with some of my bindings.
I was wondering if there is anything against adding an IsChanged functionality to it.
This should be set if the new received value differs from the previous one.

In the binding I would use this to determine if any updates to the channels are required.

If nothing against it, I'll make a pr for such a functionality.
Re: extending ExpiringCache with IsChanged [message #1770717 is a reply to message #1770480] Wed, 16 August 2017 12:59 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Bindings should not swallow any newly received states, but rather send updates, even if nothing has changed. Only in cases of a too high frequency (several per second) it is ok to suppress updates - but when using the cache, this anyhow won't be the case. So I do not really see the use case for such a functionality.
Re: extending ExpiringCache with IsChanged [message #1770848 is a reply to message #1770717] Thu, 17 August 2017 19:56 Go to previous message
Marcel Verpaalen is currently offline Marcel VerpaalenFriend
Messages: 59
Registered: September 2014
Member
But not all communication / cached info is used for status updates.....

anyway, I do agree this will be mostly used for status updates. For the one exception I have right now, I'll make a specific check for a change on the data.
Previous Topic:How to add things dynamically in the binding
Next Topic:Binding using MqttService
Goto Forum:
  


Current Time: Thu May 02 08:37:04 GMT 2024

Powered by FUDForum. Page generated in 0.03318 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top