Getting cache items in the order that they were inserted

Hi,
Is there a way to get the cache items in the order that they were inserted into the cache?
I tried the following but that does not work - the result is not in order of insertion...
NamedCache cache = CacheFactory.getCache("XXXX");
Set setKeys = cache.keySet();
debug("key size: " + setKeys.size());
Iterator keysIt = setKeys.iterator();
while (keysIt.hasNext())
Object object = (Object) keysIt.next();
debug("key: " +object);
debug ("----------------------------------------------\n\n\n");
Thanks
G

khanna111 wrote:
Hi,
Is there a way to get the cache items in the order that they were inserted into the cache?
I tried the following but that does not work - the result is not in order of insertion...
NamedCache cache = CacheFactory.getCache("XXXX");
Set setKeys = cache.keySet();
debug("key size: " + setKeys.size());
Iterator keysIt = setKeys.iterator();
while (keysIt.hasNext())
Object object = (Object) keysIt.next();
debug("key: " +object);
debug ("----------------------------------------------\n\n\n");
Thanks
GHi G,
in general there is no way to do this with get/iterate calls.
Particularly because you can't define a time order in the cache as there is no shared timesource to relate to without relying on explicit cluster-wide locking which is not done in caches by default.
Best regards,
Robert

Similar Messages

  • My ipod is stuck in permanent shuffle. It won't play albums or my playlists in the order that they were created. How can I fix this?

    My ipod is stuck in permanent shuffle. It won't play albums or my playlists in the order that they were created. How can I fix this?

    Do yo have Shuffle turned on?
    - On the Now Playing screen on the right hand side below the scrubber bar are crossed arrows. That is the Shuffle control. Tap it until it is white for no shuffle
    - There is also Shake to Shuffle in Settings>Music
    If still problem:
    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.

  • Can iPhoto place my photos in the order that they are flagged and not randomly?

    I have flagged a photos in the order that I would like them to appear. My daughter's first year. Is there a way to import them into the book in the order they are flagged? Automatically and not manually. Thank you.

    With iPhoto 9.5.1 and Mavericks I'm able to manually sort the photos in an album, select them all and create a book with the photos in the order that they were in the album.
    It also works if I only select the album and create the book.
    What version of iPhoto and system are you using?
    OT

  • I now have 5 off occurrences listed as being open despite the fact that they were all created on 2 off laptops, neither of which has now got itunes activated

    I now have 5 off occurrences of itunes listed as being open despite the fact that they were all created on 2 off laptops, neither of which has now got itunes activated. I now cannot activate itunes on either. The suggestion is that I cancel itnues activation on either which is rather difficult, obviously? Is there another way to access/ activate itunes?

    Now fixed by de-authorising computer online at Itunes store...

  • I've just bought lightroom and downloaded it and in the Develop Mode I am unable to find the 'Basic' tab. All that shows (in the order that they appear on my screen) are Histogram, Tone Curve, HSL/Color/BW, Split Toning, Detail, Lens Correction, Effects a

    My Basic Tab has vanished...clues on where I can find it. I have a horrible feeling I've pressed some 'hide' button by mistake and can't find how to undo it

    Right-click on one of the tabs that are visible and select "Basic" from the menu that's presented, Mohammed.

  • TS1424 I did not get a confirmation e-mail saying that they were reviewing my new podcast, but I can't resubmit the feed... what's going on?

    I haven't gotten any information from iTunes about whether or not they're reviewing my podcast but I can't resubmit the feed...

    Hey CEVYNBARRY!
    Here is an article for you that will help you address this issue:
    Troubleshooting "A connection failure has occurred", "The specified server could not be found" or similar messages
    http://support.apple.com/kb/ts1843
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • HT2589 how can i get the code that they were asking?i cant see the code for the gift certificate?

    they keep on asking for a gift certificate code..to complete using itunes store..but how can i redeem my code ?where can i get that?

    Click here and request assistance. Gift cards are usually if not always final sale because it would be easy enough for someone dishonest to abuse returns or replacements of them.
    (58640)

  • Is it possible to control the order that text flows appear when using them as text insets?

    I want to create multiple flows in a FrameMaker file which I can then insert as text insets. I would like to choose the inset using the Body Page Flow: dropdown list. However, there seems to be no order, alphabetical or otherwise, in which these flow appear in the drop down list. Is it possible to control this order, or is there a particular reason it appears the way it does?
    Cheers,

    IIRC, the flows are displayed in the order that they were created.

  • Flickr - putting pictures in the order that I want

    I organize the pictures in the order that I want in iPhoto and then upload them to Flickr (pro account). When I go to my Flickr site, the pictures look like they're in the order that they were taken. Am I doign something wrong?

    Hi,
    The majority of applications used to display the photos on a CD tend to sort on filename by default.
    If I want to produce a CD with photos in my album order I tend to do the following
    1) Create a temporary folder on my hard drive
    2) In PSE, I select all the photos in the album and use File -> Export as New Files and rename the photos. Give it a base name and PSE adds a sequence number. Specify the temporary folder created in 1) as the location where the photos are exported to.
    3) Use another application to write the photos in the temporary folder to a CD
    4) Delete the temporary folder
    Hope this helps
    Brian

  • What is the PowerShell code to display installed programs sorted by date that they were installed?

    What is the PowerShell code to display installed programs sorted by the date that they were installed?

    Hi Larry,
    If you don't mind using Win32_Product, you can do that this way:
    Get-WmiObject Win32_Product |
    Sort InstallDate |
    Select Name,Caption,Version,Vendor,InstallDate
    EDIT: Also,
    Bill Stewart has a good script that uses the registry instead of Win32_Product. I'm not sure if it returns an installed date though.
    http://windowsitpro.com/scripting/auditing-32-bit-and-64-bit-applications-powershell
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • TS4020 I live in a house with multiple iCloud users.  When they try to turn on "Find my computer"  they get the message that they will have to disable my "find my computer" setting in order to enable theirs.  How can they all be enabled at the same time?

    I live in a house with multiple iCloud users.  When they try to turn on "Find my computer"  they get the message that they will have to disable my "find my computer" setting in order to enable theirs.  How can they all be enabled at the same time?

    Try this support document for information on how to contact Apple and account security. Apple ID: Contacting Apple for help with Apple ID account security

  • I was warned and I went straight to the site and they were gone.  I didnt was any time. Either way, there should be a way to either store or restore such items. Have you ever lost pictures that were so important to you that you couldnt sleep or eat for...

    I was warned and I went straight to the site and they were gone.  I didnt was any time. Either way, there should be a way to either store or restore such items. Have you ever lost pictures that were so important to you that you couldnt sleep or eat for some time. I have and it wasnt fun. I'm glad that you were able to get yours unlike some of us.

    I am still wondering why iTunes tries to confuse me every time I try to make changes in my preferences, telling me that I "don't have enough permissions", although I am the administrator.
    That's clearly a fault. Whether it's an iTunes problem or a Windows problem I can't say at this time. If you search the Using iTunes for Windows forum for "permissions", you should find threads that can help you sort out this problem.
    Then, changes to the format are not obvious, and I get no notice that I am burning music files as data.
    If you click on a playlist and look at the lower-right of the iTunes window, it says right there what format it will use to burn the playlist.

  • How do you get your download photos to go in in the order that you download them in?

    Everytime i download my pictures from my iPad or iPhone, into the main and into thier albums, the album gets completely mixed.
    They dont go in in order. In the "arrange by" window, i cant find the option that makes the photos in the order that i put them in, in... please help!!!

    The order that photos appear in iPhoto on the Mac is controled by the iPhoto sort options - in events under the view menu ==> sort events
    LN

  • I was told by comcast that we had a computer in the house with a malware virus, they even said that they were going to terminate our service if we did not get it fixed. Now this week we hear that there is a trojan malware virus, how do we get rid of it?

    I was told by comcast that we had a computer in the house with a malware virus, they even said that they were going to terminate our service if we did not get it fixed. Now this week we hear that there is a trojan malware virus, how do we get rid of it?

    Hello,
    Flashback - Detect and remove the uprising Mac OS X Trojan...
    http://www.mac-and-i.net/2012/04/flashback-detect-and-remove-uprising.html
    In order to avoid detection, the installer will first look for the presence of some antivirus tools and other utilities that might be present on a power user's system, which according to F-Secure include the following:
    /Library/Little Snitch
    /Developer/Applications/Xcode.app/Contents/MacOS/Xcode
    /Applications/VirusBarrier X6.app
    /Applications/iAntiVirus/iAntiVirus.app
    /Applications/avast!.app
    /Applications/ClamXav.app
    /Applications/HTTPScoop.app
    /Applications/Packet Peeper.app
    If these tools are found, then the malware deletes itself in an attempt to prevent detection by those who have the means and capability to do so. Many malware programs use this behavior, as was seen in others such as the Tsunami malware bot.
    http://reviews.cnet.com/8301-13727_7-57410096-263/how-to-remove-the-flashback-ma lware-from-os-x/
    http://x704.net/bbs/viewtopic.php?f=8&t=5844&p=70660#p70660
    Check now whether your Mac is infected by Backdoor.Flashback.39!
    http://public.dev.drweb.com/april/

  • How Do You Control the Order That Menu Items Are Selected

    I am using iDVD 6 with the Portfolio Theme (iDVD 5). I created a project with one 15-minutes iMovie project and seven slideshows (created in iDVD).
    In Preview mode (or with the final) DVD, the order that entries on the main menu are selected does not seem to follow a logical pattern. As I try to advance using the right cursor, the second item (horizontally) is skipped. (I have two rows, each with four items). When I have one of the other three items in that row selected, the second item is selected if I hit the down arrow.
    In 'flowchart view' the eight items are in the order I want them to be selected. That is, the item that is being skipped is in the second position on the flowchart.
    Any insight on this would be appreciated.
    PowerBook G4 1.33 Ghz (me) & FP iMac - 1.0 Ghz (kids)   Mac OS X (10.4.4)   iMac (for the kids)

    I created an iMovie and then exported to iDVD, iDVD used the same sequence as the iMovie. When you build you Movie or slide show it follows the sequence that you place them in the time line. I have a Slide Show movie with video clips in the time line all of the shows and clips play in the order that I placed them. When you move through the menu use the right arrow to move accross the menu and the down arrow to move down to the next row. There is an button to move to the next menu. I have 13 chapters in my iDVD and they appear on 3 menus. Each menu shows 6 buttons you can edit the button titles and reposition them if you deselect the snap to grid and select the other option. When I open my project after exporting the titles overlayed each other. The buttons picted up my iMovie titles so I had to fix them and reduce the type size and move the buttons to separate them. The time line sets the order and the arrow keys move throgh the buttons on you Mac screen you can select with the mouse by clicking the button. On a DVD player you are stuck with the arrows and enter keys on the remote. You may have a glitch in your data check the time line along bottom of your original to see if the chapter markers are in position.
    Richard
    1.25 GHz Dual G4 Desk Top Mac OS X (10.4.6)

Maybe you are looking for

  • IPod Touch problems :( please help

    I have had my iPodTouch for just over a year now. It has always worked perfectly and I have had no problems. Up until now. I plugged it into my origonial computor that i set up my account on and it said there was an error and i needed to restore my i

  • TO_NUMBER function on varchar2 column with numbers and strings

    I need to create a column in a view that converts a varchar2 column data to number. The problem is that some of the data have strings and some numbers. I get "ORA-01722: invalid number" error when Oracle tries to covert strings (e.g. 'ABCD') to numbe

  • Rp_provide_from_last p2001 space pn-begda pn-endda

    Hi Guru's, I  am  using  PNP as LDB and after , My  requirement  is to  fetch  the records from p2001 for a specific time period mentioned in the selection screen. Code : Get  Perner. rp_provide_from_last p2001 space pn-begda pn-endda. the output   o

  • Xcelcius is not working properly under both Windows 8 (64 bit) and Windows 7 (32 bit)

    Hi all, I use Xcelcius ver 4.0 under Windows 8 (64 bit), but it cannot load canvas and data query. I tried to use Windows 7 (32 bit) but got the same result. What should I do to solve it? Here is the design captured: When I run, it's the result (noth

  • Running BIND (DNS) as a non-root user

    On Mac OS X Server 10.3.x the named daemon runs as root. I would like to change this so that named runs as a user (with out a shell). On other flavors of Unix, this typically involves using the "-u" flag when starting named. However, I am still getti