Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-06-2015, 10:20 AM   #1
nubble
Junior Member
nubble began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2012
Device: Kindle paperwhite
ConcurrentHashMap

Hi,
In an earlier post [http://www.mobileread.com/forums/sho...eventlistener] I outlined that I ma using a nmea library in my kindle PW.

After fixing the build issues in the earlier post, I discovered that the kindle doesnt like:
Code:
private static final Logger LOGGER = Logger.getLogger(SentenceReader.class.getName());
and this:
Code:
private ConcurrentMap<String, List<SentenceListener>> listeners = new ConcurrentHashMap<String, List<SentenceListener>>();
For the logger fix I shamelessly used ixtabs logger class.
however for the ConcurrentHashMap I am not sure what to use instead and was hoping for some advice here.

The project builds fine but the kindlet gets stuck/ freezes at this method.

thanks
Nubble
nubble is offline   Reply With Quote
Old 02-07-2015, 11:37 AM   #2
bulsa
Enthusiast
bulsa began at the beginning.
 
Posts: 27
Karma: 13
Join Date: Apr 2014
Device: Kindle PW
Quote:
Originally Posted by nubble View Post
however for the ConcurrentHashMap I am not sure what to use instead and was hoping for some advice here.

The project builds fine but the kindlet gets stuck/ freezes at this method.

thanks
Nubble
Have you tried using the ConcurrentSkipListMap? If it doesn't work you could just implement the ConcurrentMap interface by using a HashMap with synchronized wrapper methods.
bulsa is offline   Reply With Quote
Old 02-07-2015, 02:40 PM   #3
nubble
Junior Member
nubble began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2012
Device: Kindle paperwhite
Thx bulsa.
I'll give it a shot.
nubble is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump


All times are GMT -4. The time now is 04:35 PM.


MobileRead.com is a privately owned, operated and funded community.