Obtain cache hit and miss statistics

Hi,
     I have a cache developed in-house, which implements the HashMap functionalities of get(key), put(key, object) etc, and in addition, maintains hit and miss counts. I'm trying to replace this cache with Coherence because eventually I wish to migrate to a distributed cache. It's essential, therefore, that I fit Coherence into my application in such a way that though I would currently be using Coherence's local cache functionality, later I should be able to use the distributed cache functionality without any changes to my code. Hence, I'm using CacheFactory to obtain a cache whose config I define in the coherence-config.xml file. Here's my problem: I notice that CacheFactory.getCache() returns an object that implements NamedCache. This interface does NOT support the maintenance of cache hit and miss counts. I need this functionality! How do I work around this?
     Thanks,
     Lakshmi.

Hi Lakshmi,
     It would look something like this:
     // This example uses the default
         // coherence-cache-config.xml which maps all cache
         // names starting with 'local-' to a 'local-scheme'
         String sCacheName = "local-test";
         NamedCache cache = CacheFactory.getCache(sCacheName);
         CacheService service = cache.getCacheService();
         Map mapLocal = ((DefaultConfigurableCacheFactory.Manager) service.getBackingMapManager()).getBackingMap(sCacheName);
         if (mapLocal instanceof LocalCache)
              LocalCache cacheLocal = (LocalCache) mapLocal;
              out("Misses: " + cacheLocal.getCacheMisses());
              }Hope this helps.
     Later,
     Rob Misek
     Tangosol, Inc.
     Message was edited by: rmisek

Similar Messages

  • Bridge CS5 - Adding metadata to RAW files is hit and miss

    Can someone help me??? Bridge CS5 will only add the metadata I enter to the files it feels like doing. It is hit and miss. Some files will add it, and other files will get the message "There was an error writing metadata to 100824_Banks_06.NEF". It will go through my whole folder of RAW files, then other times it will allow one or two of the files to get the information. I am going crazy! Is this a preference setting issue, or what?

    Tai Lao wrote:
    Bridge is the weakest of all Adobe applications I use.  It suffers from the same issues since its first release, when we were told to forgive the teething problems of any version 1 application.  Now it's in version 4.x.
    I actually spent most of the last two days wrestling with Bridge, and getty pretty annoyed with it. The "Error writing metadata" bug caused me no end of problems in trying to reorganise my keywording of 20,000 photos, and turning the air blue in the process.
    I agree that Bridge seems to be the poor relation in the Creative Suite. I call it the Less Glamourous Sister. It needs to be 64-bit to host 64-bit Camera Raw, and it needs to manage resources faster and more efficiently.
    I've spent a fair amount of time watching Bridge's activity with a resources monitor utility, and it's a very busy lady. It seems to poll several drives every second or two, accessing the registry, disk-based settings and library files regularly too, even when it appears to be doing nothing. And, even though I had indexed and cached my whole 20,000 photo collection, Bridge insists on recreating some thumbnails and previews at random intervals.*
    I decided that the anti-virus software suggestion was a red herring in my case (I now realise this is the Mac forum anyway). Photos which gave an error became subsequently locked for several minutes, and I had to edit the sidecar files by hand. In the end, I worked out that, even though there is no on-screen indication of activity, Bridge is quietly working its way through every item in the Content pane, and it is this action which seems to coincide with the Metadata Error. Wait for it to end, and chances are much reduced, but not fully removed.
    Oh, and Adobe's customer treatment might be debatable, but that helpful customer you quoted was a regular abuser of other forum users, so I like to see a silver lining from that post.
    * Prefer Embedded thumbnails was also selected.
    Message was edited by: Yammer P

  • Why won't my iMac print consistantly to my compatible HP 6500A? I've checked for updates and downloaded the lasted software...still can't print. All my other Mac devices find the printer but the iMac is hit and miss. I'm operating the Mac OS X Lion 10.7.

    Why won't my iMac print consistantly to my compatible HP 6500A? I've checked for updates and downloaded the lasted software...still can't print. All my other Mac devices find the printer but the iMac is hit and miss. I'm operating the Mac OS X Lion 10.7.

    When you say hit and miss do you mean sometimes you print a whole document with no problems, or do you mean each document has problems? This is from HP's website for your printer:
    Your sig says 10.6.7 but your message says 10.7. So if it's really Lion, this printer isn't officially supported. Elsewhere on HP's site it says updated drivers will be available on your Mac via Software Update. Have you run that recently?

  • Counter negative cache hits and long searches

    hi my name is sumit.
    In my network there is a frame-relay pvc on 7206 VXR router on which 2 T1's are terminated(from S8700 EPABX) and the bandwidth of this PVC is 600 KBPS. we are using rtp and tcp header compression technique(codec g729r8).7206 router is connected to IGX through HSSI cable and there is a IGX to IGX connectivity from INDIA to US. At US site there is a same network. and it is further connected to AT&T cloud. mainly on this PVC there is inbound traffic which comes from US AT&T cloud.
    we are facing a lot of voice quality issues and when i use show frame relay ip rtp header-compression.
    the counter negative cache hits and long searches rapidly increases
    can somebody help me to solve the problem.
    and tell me is there any affect on voice quality if these counters rapidly increases

    hi Neo thanks for reply.
    r u from Datacraft ?
    I am also from Datacraft
    i have already used this URL. but it gives only one statement about counters.
    but i am asking what could be an impact of these counters on voice ?
    please reply
    thanks

  • Affect of negative cache hits and long searches

    hi my name is sumit.
    In my network there is a frame-relay pvc on 7206 VXR router on which 2 T1's are terminated(from S8700 EPABX) and the bandwidth of this PVC is 600 KBPS. we are using rtp and tcp header compression technique(codec g729r8).7206 router is connected to IGX through HSSI cable and there is a IGX to IGX connectivity from INDIA to US. At US site there is a same network. and it is further connected to AT&T cloud. mainly on this PVC there is inbound traffic which comes from US AT&T cloud.
    we are facing a lot of voice quality issues and when i use show frame relay ip rtp header-compression.
    the counter negative cache hits and long searches rapidly increases
    can somebody help me to solve the problem.
    and tell me is there any affect on voice quality if these counters rapidly increases

    Is there any one to answer this query..........
    any update .............

  • Face detection hit and miss

    I am finding this feature to be very hit and miss. I have a lot of folders with full-on, well-exposed face shots that LR is not picking up faces in, and other folders with partial faces that are obscured, dark, or over blown that it is picking out faces in. Then there were the random squiggles of grass that LR thought was my very bald brother...
    There doesn't seem to be a way to get it to re-check folders, and "find similar faces" doesn't seem to do anything but look for faces I've already confirmed - the naming makes it seem like if you say, "Hey, here's a face to look for," it would go back through the folder/catalog and look for similar faces that weren't already picked out.
    It's got potential, but in its current state, I'm going to have to go through and manually choose faces in thousands of photos that LR theoretically should be picking out. Bummer.
    Keep working on it, Adobe.

    My experience so far with LRs face detection is a little disappointing as well.
    I understand that machine face recognition has severe limits. Persons age, change in expression, glasses, hats... not to speak of angle of shooting, light conditions etc etc. Plus it needs to be computationally feasible.
    And yet when I started to name a person, particularly after having tagged some childhood pictures, the suggestions started to get very very odd, including faces from the opposite sex, some graphic ornaments on a wall, and ancient Greek statues.
    And then going through a large collection (again!), with thousands of clicks...
    Adding to the disappointment: Although LR CC writes face data to XMP-mwg-rs tags (jay!), it does NOT read and process existing XMP-mwg-rs written by other software (Nooooooo!).
    Thousands and thousands clicks to go, again...

  • NTLMv2 hit and miss

    I connect to shares on a Win 2003 box and an Ubuntu samba server with NTLMv2. But shares on a Win XP sp3 box and a Win 7 sp1 VM will only connect if I use sec=ntlm. Matching the settings on the problem machines to the 2k3 box (local security policy and a running NTLM-related service) had no effect. I spent hours googling yesterday, the only solution I found to NTLMv2 connection problems was... use NTLMv1.
    Does anyone have shares on XP or 7 connected with NTLMv2? If so, do you remember if you had to modify anything to get it working?

    The performance is really hit and miss.
    Do you mean apart from the issue of messages not showing up in the Inbox?
    Are your really using Mac OS X 10.4.3, as your profile indicates?
    the messages are there, there just seems to be an
    issue pulling them into Mail.
    Try rebuilding the Inbox, i.e. select it and do Mailbox > Rebuild.

  • Ical alarms hit and miss

    I have an Imac 2.4GHz running Leopard 10.5.8. We have 4 calendars, and the alarms are hit and miss. Sometimes they go off, and sometimes not. And sometimes they go off a day later. Any suggestions?
    Thanks,
    Todd Frank

    The performance is really hit and miss.
    Do you mean apart from the issue of messages not showing up in the Inbox?
    Are your really using Mac OS X 10.4.3, as your profile indicates?
    the messages are there, there just seems to be an
    issue pulling them into Mail.
    Try rebuilding the Inbox, i.e. select it and do Mailbox > Rebuild.

  • Hit and Miss Behaviour With Exchange

    I have Mail connecting to an Exchange server. The performance is really hit and miss. Sometimes messages appear in my mailbox literally hours after they were sent. Sometimes never. If I look at my account through the Exchange web interface the messages are there, there just seems to be an issue pulling them into Mail.
    Anybody got any ideas?

    The performance is really hit and miss.
    Do you mean apart from the issue of messages not showing up in the Inbox?
    Are your really using Mac OS X 10.4.3, as your profile indicates?
    the messages are there, there just seems to be an
    issue pulling them into Mail.
    Try rebuilding the Inbox, i.e. select it and do Mailbox > Rebuild.

  • Since maverick download my inbuilt track pad (macbook pro) is hit and miss with scrolling up and down (this is safari, chrome and FF)

    Since maverick (os X 10.9.1) has been installed my track pad on my mac book pro (late 2011) is hit and miss, reset it worked for a bit then seems to die. Doesn't matter what application I am using. This is on all internet browsers as well FF, Safari and chrome.
    I took it to the apple store and they couldnt find anything wrong with it (as ive had other issues with it such as a kernal panic and optical drive spitting out dvds and not burning cds properly)
    Its only scrolling it seems to have an issue with. All the othe gestures are fine ive even tried switching all the gesture off and on again, restarting the mac but the same problem persits a while later. It can be working for 10minutes or 8 hours and then boom no longer works.

    Remove Growl, DiVXHTML and other DIVX software (use MPEG4Streamclip or Smartconverter or Wondershare Videoconverter for videos you need to convert for your own use, and not for giving to others unless you own the copyright for it).  Update your Adobe Flash from http://www.adobe.com/
    Shut down  Parallels except when you need to use.  Disable Citrix and your File Sharing for VPN or remote access for Citrix except for when you use remote access.  Find out how to remove Peerguardian.  The Mac has its own firewall which blocks all except ping attacks through Apple menu -> System Preferences -> File Sharing.  Use a hardware router to block ping attacks.  Parallels has its own built-in networking firewall for Parallels itself.
    This tip may uncover other slowdowns: https://discussions.apple.com/docs/DOC-6921

  • PGA Cache Hit %  and paging

    Hello!
    In AWR report I see decreasing PGA Cache Hit % .
    Does it mean that in OS begins more intensive paging ?
    Thanks and regards,
    Pavel

    Pavel wrote:
    Hello!
    In AWR report I see decreasing PGA Cache Hit % .
    Does it mean that in OS begins more intensive paging ?What do OS statistics report?
    OS paging is expected & desired; as opposed to swapping.

  • Weblogic Hits and Misses means

    Hi All,
    What does this line in osb logs means?
    ####<Jan 28, 2012 1:01:54 AM GMT+08:00> <Debug> <RuntimeRouterCache> <crmosb09> <osb_ms3> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1327683714347> <BEA-000000> <4 hits received: 1 hits to main cache, 0 hits to soft cache, 3 misses.>
    Thanks.

    I already found what it means:
    ####<07.02.2010 7.51 Uhr CET> <Debug> <RuntimeRouterCache> <yourMachine> <AdminServer> <[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <BEA1-00274E42DC16902065C0> <> <1265525468953> <BEA-000000> <1 hits received: 0 hits to main cache, 0 hits to soft cache, 1 misses.>
    In this example, the service call was not served from the cache. The message setup is:
    [RuntimeRouterCache] XX hits received: YY hits to main cache, ZZ hits to soft cache, MM misses
    Where:
    * XX represents the number of times that the cache was accessed since the last log.
    * YY represents the nummer of times (out of XX) that the cache contained the proxy service.
    * ZZ represents the number of times (out of XX) that the cache contained the proxy service amongst those to be garbage collected (for example, the cache was able to reclaim the proxy service before the garbage collector did).
    * MM represents the number of times (out of XX) that the cache did not contain the proxy service and had to recreate it.
    Another question is, does a proxy service needs to be in the RuntimeRouterCache before it service the request and how long does it take before it put the proxy to the cache and service the request?
    Edited by: 827591 on Feb 8, 2012 9:52 PM

  • Selecting an existing volume control point-hit and miss

    Hi folks,
    Learning GarageBand feature by feature and enjoying it at every step.
    Minor annoyance with the following and hoping someone has a way to make it less so.
    I added volume control points to a song track to lower the volume at certain areas. I wanted to modify the levels but for the life of me selecting the already existing points results in adding a new control point I can never hit the blue dot on target to select it.
    Any key click available to ensure I select the control point I want to move and not create a new one?
    Thanks in advance.

    FrankMtl wrote:
     Any key click available to ensure I select the control point I want to move and not create a new one?
    i'm afraid not, the only advice is to set and click the mouse _very_ carefully, and perhaps zooming the screen to see the point and mouse tip better

  • Weird Startup Chime / Hit-And-Miss Booting / freeze when door is closed!

    I have a Digital Audio - originally 466.
    Upon startup, instead of hearing "BONG" I hear "B-static-O-static-N-static-G-static"
    Most of the time, the computer boots fine. Sometimes it will never send signal to the displays. rarely, i'll hit the power button, and hear the remixed chime, but the power button goes out - the the case fans still running.
    Also, if I keep the door to the computer closed, the computer will eventually freeze or panic.
    Replaced onboard battery, reset stuff in OF, replaced ram, replaced vidcard, has two hard drives, has cpu upgrade to dual 1ghz.
    I'm stumped!

    All of the fans work properly, nice and clean inside, too.
    Nothing plugged into the audio ports - use a USB audio interface. The goofy startup noise happens irrespective of the use of the audio port.
    the CPU is a sanctioned (or whatever) OWC upgrade.

  • 3D tools hit and miss

    Playing around with the new 3D  in CS6, on the whole very impressed, however  noticed a few things.
    If you have capslock on the navigation tools (Slide, drag, roll and rotate) don't work.  Also when I select the mesh and the Red, Green blue axis HUD is shown, sometimes it lets me select the various parts, to rotate, slide etc. the  z,x or y  axis , other times its unresponsive, and won't do anything. I have increased the side of the HUD, but still the same.
    I running the beta on a Windows 7 machine.

    I found that making sure the right "layer" in the 3D menu is active seems to help with the XYZ tools.
    It seems to take a LOT of finesse to get things to move to just where you want them, but I sort of chalked that up to my being completely unfamiliar with 3D software before trying it.
    -Noel

Maybe you are looking for

  • User exit badi scenario

    can anybody mail me realtime working user exit and badi scenario how to do everything in my email i had seen all documents of net nothing makes it clear .kindly provide real time scenario thanking you in advance Moderator message : Not enough re-sear

  • Reinstalling mountain liom on macbook air 2012 takes much time?

    Is This normal? Im currently reinstalling os on my secondhand macbook air 2012. It will took almost 2 days. Will this be just fine? Letting the macbook turned on for 2 days? Does this wont overheat the macbook? Or damage its parts? Or this wont reall

  • Insert/Update problems with form

    This is my first time using data entry in Oracle Portal. I followed the example given in the 'Create and event calendar' in the tutorial. i created a simple form and an ID column. I created a sequence and a default value field with the parameter 'nex

  • Export Error..URGENT !!!!!!!!!!!

    Hi All..!! I am trying to export some table data from test instance to prod instance.Given below is the command i am using, exp apps/mwpr0dg0ld parfile=params.par, The contents of the parameter file params.par is given below, file=test1.dmp,test2.dmp

  • Changes to uploaded website colors will not change on firefox, although it showa on internet explorer

    I uploaded my website with filezilla. Color changes were made. Om firefox the old clors still show, even after refresh. On internet explorer the website displays the correct colors.