Best collection for this purpose

hai
i am developing a system which have messaging as the main goal .different clients from remote locations have to send messages(byte array) to an MDB .But my problem is i cant control this messaging system as lot of messages have to be processed by the MDB. So i want a good collection procedure to collect the messages and there by process the messages one by one,.Can any one tell me which collection class is suitable for this or any other ideas. Thanks in advance.

Decision procedure:
(a) do you need a separate unique key to access the data? If so, use some form of Map. Otherwise
(b) do you need uniqueness within the collection? If so, use some form of Set, otherwise some form of List or Queue.
(c) If you need a Map or Set, do you need ordering? If so use a sorted Map/Set/List (TreeMap/TreeSet), otherwise a hashed Map/Set/(HashMap/HashSet). OR
(d) if you need a List, do you need random access to inner elements? If so use an ArrayList, otherwise a LinkedList. If you only need access to the front and rear of the list consider a Queue.

Similar Messages

  • Design Patterns, best approach for this app

    Hi all,
    i am starting with design patterns, and i would like to hear your opinion on what would be the best approach for this app. 
    this is basically an app for data monitoring, analysis and logging (voltage, temperature & vibration)
    i am using 3 devices for N channels (NI 9211A, NI 9215A, NI PXI 4472) all running at different rates. asynchronous.
    and signals are being processed and monitored for logging at a rate specified by the user and in realtime also. 
    individual devices can be initialized or stopped at any time
    basically i'm using 5 loops.
    *1.- GUI: Stop App, Reload Plot Names  (Event handling)
    *2.- Chart & Log:  Monitors Data and Start/Stop log data at a specified time in the GUI (State Machine)
    *3.- Temperature DAQ monitoring @ 3 S/s  (State Machine)   NI 9211A
    *4.- Voltage DAQ monitoring and scaling @ 1K kS/s (State Machine) NI 9215A
    *5.- Vibration DAQ monitoring and Analysis @ 25.6 kS/s (State Machine) NI PXI 4472
    i have attached the files for review, thanks in advance for taking the time.
    Attachments:
    V-T-G Monitor_Logger.llb ‏355 KB

    mundo wrote:
    thanks Will for your response,
    so, basically i could apply a producer/consummer architecture for just the Vibration analysis loop? or all data being collected by the Monitor/Logger loop?
    is it ok having individual loops for every DAQ device as is shown?
    thanks.
    You could use the producer/consumer architecture to split the areas where you are doing both the data collection and teh analysis in the same state machine. If one of these processes is not time critical or the data rate is slow enough you could leave it in a single state machine. I admit that I didn't look through your code but based purely on the descriptions above I would imagine that you could change the three collection state machines to use a producer/consumer architecture. I would leave your UI processing in its own loop as well as the logging process. If this logging is time critical you may want to split that as well.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • I am having trouble trying to get my address book from my mac (just downloaded Lion for this purpose) to my 3G ipad. Set up an icloud account but still confused! Please help !

    I updated my mac with  os x Lion so that I could accomplish moving my address book from the mac to my new IPad 3G. I also set up an icloud account for this purpose, but I *still* cannot figure out how to move my address book from one computer to the other. When I'm on my mac and try to use bluetooth to export the address book, I'm able to find my ipad but I soon get a message that it does not support the necessary services. I have no idea what's going on and would appreciate any advice. tks in advance, Sarah

    blacksheepfibers wrote:
    I updated my mac with  os x Lion so that I could accomplish moving my address book from the mac to my new IPad 3G. I also set up an icloud account for this purpose, but I *still* cannot figure out how to move my address book from one computer to the other. When I'm on my mac and try to use bluetooth to export the address book, I'm able to find my ipad but I soon get a message that it does not support the necessary services. I have no idea what's going on and would appreciate any advice. tks in advance, Sarah
    The address book syncs via iCloud, not Bluetooth or iTunes.
    You upgraded to Lion so you could use iCoud.
    On the computer. go to Apple menu > System prefs > iCloud.
    Sign into your iCloud account.
    Tick everything.
    This enalbes the se items syncing to iCloud.
    On the iPad, Settings > Mail, Contacts, Calendars.
    Create a new iCloud account.
    Sign in with the same AppleID as your computer.
    Settings > iCloud and turn everything on.
    BAM!
    That is all you need to do.
    Your contacts (and all other checked items checked) will sync between computer and iPad.
    No need to use iTunes

  • I am trying to use Find My Phone for people to follow me on the NYC Marathon next week.  Is there a way to set up a temporary User ID and Password to give out to people for this purpose?  I would obviously want to delete that log in info after the race.

    I would like to use Find My Phone for friends and family to follow me during the NYC Marathon next week.  Is there a way to set up or temporarily change my User ID and Password for this purpose?

    New York Runners has an app that is specially designed to do exactly that. It's (or will be) available in the App Store.
    http://www.nytimes.com/2011/10/27/sports/for-new-york-city-marathons-fans-a-cell phone-app-to-keep-in-touch.html?ref=technology
    You might also look at apps like RunMeter. It will let you send updates by email, Facebook or Twitter. Glympse is another app that, though not designed specifically for runners, might also be useful.

  • TA24002 My 500 GB can't verify nor repair. I have photoshop work that I need to recover. I would like to know which erase option would be the best solution for this problem.

    My 500 GB can't verify nor repair. I have photoshop work that I need to recover. I would like to know what option would be the best solution for this problem?

    You appear to have two issues: 1) a hard drive that is not working properly and 2) files you wish to recover.
    Re 1) you need to answer Kappy's questions.
    Re 2) does the drive load and can you see your photo files? If so can you copy them to another drive?
    Do you not have a backup of the photo files?

  • I have problems in the initiation of the Encore process when opening presents the following error message : "Encore CS6 Cannot Run in Non-Royalty Serialized".... What is the best solution for this problem ?

    Help Me.
    What is the best solution for this problem ?

    Encore is activated when you activate Premiere Pro... so, as Stan asked, how did you install P-Pro?
    Ask for serial number http://forums.adobe.com/thread/1234635 has a FAQ link
    -and a fix for Encore http://forums.adobe.com/thread/1421765?tstart=0 in reply #7
    -plus more Encore http://helpx.adobe.com/encore/kb/cant-write-image-fie-larger1.html

  • HT204053 I had Snow Leopard and was using iWeb and Filezilla for my website (not MobileMe). Wanting to move to single-click publishing, I now find it is not supported by iCloud and Mountain Lion. I feel cheated, having bought it mainly for this purpose!

    I had Snow Leopard and was using iWeb and Filezilla for my website (not MobileMe). Wanting to move to single-click publishing (supported by MobileMe), I now find it is not supported by iCloud and Mountain Lion. I feel cheated, having bought it mainly for this purpose! The other thing they don't tell you is that Mountain Lion disables OfficeMac, and I am considering uninstalling it for that reason - do I get my money back?!

    You stated; "Mountain Lion disables OfficeMac"
    That is not true.
    Mountain Lion does not have Rosetta so it is not capable of executing PowerPC code. If you have MS Office 2004 that is coded in PowerPC code and will not run in Mountain Lion. What you need to do is upgrade to an Intel version of Office.
    Allan

  • What’s the best practice for this scenario?

    Hi,
    My users want the ability to change the WHERE and/or ORDER BY clause at runtime. They may define user preferences on each screen ( which is bind to a view object). They want to see the same records based on WHERE/ORDER BY defined on the last visit. That is why I keep the users preferences and load the screen based on that, using :
    View.setWhereClause(...);
    View.setOrderByClause(...);
    View.executeQuery();
    This works good when only one user working with the application but faced low performance when more than one user working with the application.
    What are the points to increase the performance and what is the best practice for this scenario?
    Thanks for your help in advance.

    Sung,
    I am talking only about 2 users in my testing. I am sure i missed something but could not recognize that.
    This page is my custom query page including a tag to instantiate app module in stateful mode at the top <jbo:ApplicationModule..> and a tag to instantiate data source <jbo:Datasource...> and release tag at the bottom <jbo:ReleasePageResources..> and some java code in the middle(body). The java code constructed the query statement and then fires the query to set the view object based on the query statement using the above methods.
    So, I am facing very slow performance(speed) when two clients load this page at the same time. Looks like the entire application locks for others when one client load this page and fire the query. i realized the battle neck is where executeQuery() is executing.
    what do you think.
    Thanks in advance for your comments.

  • I have Mac Pro 2007, which have no bluetooth hardware. What should I do to use Apple wireless keyboard and magic mouse??? Can 'third party's internal bluetooth card' be used for this purpose? Help please...

    I have Mac Pro 2007, which have no bluetooth hardware. What should I do to use Apple wireless keyboard and magic mouse??? Can 'third party's internal bluetooth card' be used for this purpose? Help me please...

    You can find the Apple Bluetooth card on eBay for as little ten dollars (says its for the 2008 model Mac Pro, not sure about the 2007).
    http://www.ebay.com/itm/Bluetooth-Board-iMac-and-Mac-Pro-922-8233-922-8233-/1208 49278570
    Here is a link to a full explanation of the card and how to install it. Part numbers may differ a bit as that is an old article and newer models have come out.
    http://www.xlr8yourmac.com/systems/Mac_Pro/Bluetooth_MacPro_install/Bluetooth_Ma cPro_install.html
    Just make sure that the part will work in your model Mac Pro. To that end, you may be better off avoiding eBay and going to a parts reseller. There are even third party cards that use the internal Apple bluetooth slot.
    http://fastmac.com/bluetooth.php
    In theory, using a USB or PCI card will work at login so long as it is recognized by Apples drivers. You say you need to launch an application to use your current USB Bluetooth dongle? If it is not controlled by the Bluetooth icon in the menu bar then it must be using a third party driver of some sort. Unfortunately, I don't know off hand which USB and PCI cards are supported.

  • Best fan for this heat sink?

    best fan for this heat sink?
    http://www.newegg.com/app/ViewProductDesc.asp?description=35-109-118&depa=0
    ty in advanced

    Snakexor,
    Hard to tell.
    It really depends on your tolerance to noise and/or your goals - OC, pimped out rig, etc.
    I usually prefer something on the silent side. SilenX were good for me, pretty quiet. I have XP90 though, XP-120 doesn't fit neo2.  
    Check out these guys:
    http://heatsinkfactory.com/cgi-bin/HFAstore.pl?user_action=detail&catalogno=HS-004
    They usually know what they are talking about. There are 3 fans suggested with XP-120 there.
    Hope this helps.....

  • I cannot install ODX Yosemite over OSX Mavericks as my Mac Book Pro (early 2011) advises that the disc "Mackintosh HD" is used for Time Machine back ups. This is not the case however as I use a separate external HD for this purpose, help please ?!  T

    I cannot install ODX Yosemite over OSX Mavericks as my Mac Book Pro (early 2011) advises that the disc "Mackintosh HD" is used for Time Machine back ups. This is not the case however as I use a separate external HD for this purpose, help please ?!
    Thanks

    Check this link out...
    OS X: Cannot install on a volume used by Time Machine for backups
    I was apart of this thread and it helped the OP...
    Re: System installer thinks my main drive is my time Machine backup and won't install.
    KOT

  • How to turn off "Adobe PDF settings for Autodes AutoCAD documents" dialog box between pages of a batch conversion?  There is a check box for this purpose, but it is grayed out, and of course unusable?!

    How to turn off "Adobe PDF settings for Autodes AutoCAD documents" dialog box between pages of a batch conversion?  There is a check box for this purpose, but it is grayed out, and of course unusable?!

    How to turn off "Adobe PDF settings for Autodes AutoCAD documents" dialog box between pages of a batch conversion?  There is a check box for this purpose, but it is grayed out, and of course unusable?!

  • H.264 What is the best use for this? H.264 Pros & Cons?

    I wanted to know since I am using DV what if any role can H.264 play in my workflow? What are the intended or best uses for this? What are H.264 pros and cons? Will it produce higher quality than DV?
    As always thanks in advance for reading and replying to my post,
    Sebastian

    It will not make DV look better, it is a MPEG4 based compression format for material to be delivered over the web. As such, encoding your material to it it is the last step in the editing process.
    x

  • HT3819 I want to send my itunes library from my old macbook (start up disk nearly full) to my new iMac then delete my itunes library from my old macbook.  Is Homesharing my best choice for this?

    I want to send my itunes library from my old macbook (start up disk nearly full) to my new iMac.   Then delete my itunes library from my old macbook.  Is Homesharing my best choice for this?
    What I don't want to happen is once I delete my itunes library from my old Macbook that the iMac itunes library to delete itself because I am using Homesharing.  Does homesharing sync and make that happen?

    Here is some help.
    https://discussions.apple.com/thread/3849933
    After confirming that all your stuff is on the drive, delete the photos you have copied. You will need to empty the iPhototrash to free up the space.

  • HT201328 I'd like to unlock my iPhone 5 for use on a trip overseas. Is it possible to unlock it for this purpose?

    I'd like to unlock my iPhone 5 for use on a trip overseas. Is it possible to unlock it for this purpose? I bought it before January 26th, so my understanding is that it is legal for me to do so without carrier approval.
    To be clear, I don't wish to leave AT&T when in the US, but while visiting my wife's relatives we really need a local number that they can call. I asked AT&T to do it for me, but they refused. I know there are shady ways to get it done, but honestly, if I wanted to live in that realm, I would have bought an Android.
    Thanks in advance!

    I'm not saying you're definitely wrong about the legality, but I certainly have different information:
    http://arstechnica.com/tech-policy/2013/01/unlocking-new-cell-phones-to-become-i llegal-on-saturday/
    I'm no lawyer, but the official document appears to support my assertion that unlocking a phone purchased before January 26th is grandfathered into the prior exemption which allowed unlocking any phone at any time.
    http://www.gpo.gov/fdsys/pkg/FR-2012-10-26/html/2012-26308.htm
    Thanks for mentioning the warranty issue. I cannot find an authoritative reference regarding it, though. What I have read indicates that Apple has been fairly vocal about stating that jailbreaking may void your warranty, but has been pretty quiet about unlocking. None of these posts, however, gives any reference either way, so it is difficult to ***** the accuracy.
    I'm open to hearing different information as I definitely do not know everything about this subject.
    If possible, can you reference your sources?

Maybe you are looking for

  • Cisco NSS324 - how can I get a list of opened files - similar to psfile

    I have a Cisco NSS324. I need to determine what files are open and by what users. I have AD integration - so the users I am looking for are Windows users. for Windows servers we are using 'psfile' - how can we get a similar tool that works with the C

  • SIT Clearing A/c for STO

    Dear Experts , Following scenario is expected to happen between 2 plants under 1 company code. PO to be raised by receiving plant PO Mat. Code --STB PO Qty--100 Freight Condition --     2% Octroi Condition --     2 % Octroi and Entry Tax Condition bo

  • JDev 10.1.2 update to J

    We need to use JDev 10.1.2 for portlet development purposes (need to have the portlet builder pluggin), we update the J2SE version from 1.4 to 1.5. The upgrade was successful, but now all my JUnit test and my struts-html.tld classes are reporting err

  • Sticky notes problem, Acrobat reader

    Hello, I was unable to find an answer to this question in old discussions therefore I have to ask it. I am preparing pdf file with multiple comments for print. On some pages I have more than one comment and I can't have them all open at the same time

  • E63 EMAIL ATTACHMENT DOWNLOAD

    Hi, How can I download the email attachments(nokia messaging mail) in my device directly to memory card?  Nokia E63-1, RM-437, 510.21.010 Nokia C5-00.2,RM-745,091.002 Solved! Go to Solution.