How to Remove a Entry in cache but do not trigger the erase in cachestore

hi guys,
I meet a really special requirement, like the topic, I have a distribute-cache, when put a object in cache, will tigger save method in cachestore to store it to DB, when remve a entry, will tigger the erase method to delete it from DB, and then I need another operation--which can just remove the entry on cache and won't delete from DB? I checked eviction method, but I think it's for local cache. how could I use it on near-cache or distribute cache.
anyone could help me?
Thanks a lot.
best,
DFJ
Edited by: 912032 on Mar 2, 2012 12:37 AM

let me post my code:
package com.admin.processor;
import java.io.IOException;
import com.tangosol.io.pof.PofReader;
import com.tangosol.io.pof.PofWriter;
import com.tangosol.io.pof.PortableObject;
import com.tangosol.util.InvocableMap;
import com.tangosol.util.processor.AbstractProcessor;
public class ValueEvictor extends AbstractProcessor implements PortableObject {
     @Override
     public Object process(InvocableMap.Entry entry) {
entry.remove(true);
return null;
@Override
public void readExternal(PofReader pofReader) throws IOException {
@Override
public void writeExternal(PofWriter pofWriter) throws IOException {
     public static void main(String[] args) {
          AccountKey key = new AccountKey("Test0015678",24);
          AccountEntity account = new AccountEntity();
          account.setDescription("testDescrtiption");
          account.setName("hello");
          account.setParentID(18);
          account.setKey(key);
          NamedCache namedCache=CacheFactory.getCache(account.getClass().getName());
          //namedCache.put(account.getKey(),account);
          namedCache.invoke(key, new ValueEvictor());
Edited by: 912032 on Mar 2, 2012 1:16 AM

Similar Messages

  • How to remove an entry from crs_stat which is NOT in ocrdump

    Hi experts,
    Env; Sun Solairs 10
    RAC -- 2 node cluster
    verison 10.2.0.3.0
    CRS isused
    NO vendor clusterware
    I've 4 instances running on 10.2.0.3.0.. Creating a new DB on the same ORACLE_HOME using dbca. Hit into a bug 5886151 and aborted the install..
    NOW, there were some entries in ocrdump.. so used srvctl ro remove the database from CRS... OCTDUMPFILE is godd now..
    However., then I do crs_stat. I do see the below entries..
    NAME=ora.<<DBNAME>>.db
    TYPE=application
    TARGET=OFFLINE
    STATE=OFFLINE
    How to remove thsi entry???
    Thanks
    regards
    Natrajan

    There are "cap" files that contain the information on the resources in crs they are usually located in $CRS_HOME/crs/profile or $CRS_HOME/crs/public I have not tried this but I believe you can edit, remove, etc these files and then run the crs_register command pointing to the directory where the "cap" files are.
    If I were you I would probably contact Oracle support before doing this though. Unless this cluster is not being used currently and you can risk this type of operation on your own.

  • How to delete an address which shows, but is not in the address book.

    Sometimes when I address a message I see three identical correct addresses and one old one that is no longer good. How can I delete all but one of the addresses? They do not appear in the person's contact info or on the address book list. Thank you, Marty

    All suggestions come from one of your address books. You have two by default in Thunderbird. The Personal and the Collected books. Find the problem addresses and fix or delete them.

  • I have an imac 2009 the disk drive is damaged and I have lost the passwords I need to reset passwords I tried booting with a macosx disk from an external hard drive but did not read the drive how else can I reset password ?

    I have an imac 2009 the disk drive is damaged and I have lost the passwords I need to reset passwords I tried booting with a macosx disk from an external hard drive but did not read the drive how else can I reset password ?
    I have a 2012 mac book pro can I use that to connect with firewire and load osx that way? and how woudl I do that?
    Thanks so much!

    To what password are you referring? Do you mean your user account's admin password? Or do you mean the master password for File Vault or do you mean a Firmware Password?
    For an admin password:
    Forgot Your Account Password
    For Snow Leopard and earlier
         Mac OS X 10.6- If you forget your administrator password
    For Lion/Mountain Lion
        Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
         When the menubar appears select Terminal from the Utilities menu.
         Enter resetpassword at the prompt and press RETURN. Follow
         instructions in the dialog window that will appear.
         Or see Reset a Mac OS X 10.7 Lion Password and
         OS X Lion- Apple ID can be used to reset your user account password.
    If you cannot do the above then try this:
      1. Boot to Safe Mode by restarting and after the chime press and hold down the COMMAND-S keys until a black screen with white type appears.
      2. At the prompt, type the following commands pressing return after each command line:
         /sbin/fsck -yf
         If you do not receive a "Filesystem OK" message then repeat this command until
         you do.  If after seven tries you still do not receive a "Filesystem OK" message,
         then the system is corrupted and needs to be reinstalled.
         mount -uw /
         cd /private/var/db/netinfo
         mv local.nidb local.old
         rm ../.AppleSetupDone
         shutdown -r now
    The second-to-last command above will cause OS X to think that the operating system is newly installed, and when the new owner starts up the computer it will send him/her to the startup wizard where he/she can start a new user without reinstalling.
    This last method does not actually change a password. It simply removes the user accounts and lets you create an initial admin account as if the computer were new out of the box.
    How to reset the OS X password without a startup CD:
    Reboot into Single-user Mode. Enter the following and press RETURN after each command line
       1. Type fsck -fy
       2. Type mount -uw /
       3. Type passwd <username>
    I have never tried this method myself.

  • How to remove block from trusted web site. I did the obvious by pasting the web address in the allow content area. What are the other ways

    I am a cityville game player on facebook and for some reason today I am unable to send out blasted on the game when if fact this was never a problem. Finally I went to internet explorer and the same problem happen, but internet explorer let me know that the content was blocked. All I had to do was unblock it and that was easy and know I can blast out. However trying to remove the block from fire fox is a issue. I went into to tools and removed every block and it still want work right. Therefore, how to remove block from trusted web site. I did the obvious by pasting the web address in the allow content area under tools options. What are the other ways

    Hello,
    Thank you for your post.
    I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
    the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    Because your issue is about ASP.NET website programming, I suggest that you can consult your issue on ASP.NET forum:
    http://forums.asp.net/
     for better solution and support.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I have playlists on my original iPod but are not in the library.  How can I move them from the iPod to the library?

    I have playlists on my original iPod but are not in the library.  How can I move them from the iPod to the library?

    She can choose to either enable the setting on her iPod to Manually manage music and videos.  With setting enabled she can sync content to her iPod from multiple computers without it affecting whats already stored her iPod. For more information on syncing content to an iPod manually see this article. 
    http://support.apple.com/kb/ht1535
    However, I would recommend copying whats on her iPod to her iTunes library first.  There are several ways to accomplish this.  See this older post from another forum member Zevoneer discussing the different ways to do it.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • TS1646 How to remove credit card details? "None" option not there

    How to remove credit card details? "None" option not there

    Same here I can't update or download anything

  • TS3274 How to remove an old iCloud account from my IPad.  The account (email) was on my dad's name and he resently change it and now i can't  reset or delete his iCloud account without his password.  Please advise on the procedure.  Thanks.

    How to remove an old iCloud account from my IPad.  The account (email) was on my dad's name and he resently change it and now i can't  reset or delete his iCloud account without his password.  Please advise on the procedure.  Thanks.

    If you are trying to activate an iPad or iPhone and it is asking for a previous owners Apple ID and password, you have encountered the Activation Lock. This is a security feature that prevents thieves from setting up and using a stolen or lost iPad or iPhone. You have no alternative. You must use the previous owner's password to get permission to use the device. If you cannot get the password your father put on the iPad you will never be able to activate the device and no one can help you do it.

  • My wife's iTunes ID will no longer work.  Tried to reset password but did not get email, tried to reset by answering personal questions' but will not accept the correct date of birth.  Has it been hacked?  How can I fix this?

    My wife's iTunes used ID will not work.  Tried resetting the password, but email was not received.  Tried using personal questions method, but would not accept the correct date of birth, so could not go any further.  Has her iTunes ID been hacked?  How can I fix this?

    Thanks for that advice @randers4.
    I linked through and submitted my info as a "topic not covered" in the iCloud section. After entering the serial number of my MBP it turns out I wasn't eligible for technical support (though I don't think this is hardware related support) and the final suggestion was to take my computer into an Apple store. I called my local Apple reseller and asked for assistance. The customer service rep was very nice but unable to help, so suggested I call Apple Support on 1300 321 456. I did so and, again, spoke to two very polite and helpful customer service people (I was transferred to security services). I didn't have to be on hold to speak to either rep for more than a few seconds! After trying a few different things, he worked out what was happening...
    So, to cut a long story short, to solve the problem in my OP, all I had to do was log out of iCloud in my System Preferences and log back in using my current Apple ID. [Edited to add that I had to sign out of everything I was currently signed in to with my Apple ID before logging out and in again.]
    Problem solved!
    Message was edited by: NotBaconBits

  • If my Iphone 4 was stolen and I want to delete text and email messages remotely but do not have the moblie me app installed, how can I do it?

    I have an Iphone that was stolen and I want to delete all text messages remotely, but do not have the mobile me app installed.  How do I do this?

    You don't. Change all your passwords, tell you provider, tell the police, tell your insurance company.

  • HI, I need your help. How can I delete all data, when I do not have the special security code, which I didn´t remember ? I also think, that I never create this code before. But I cannot put my settings back.

    HI, I need your help. How can I delete all data, when I do not have the special security code, which I didn´t remember ? I also think, that I never create this code before. But I cannot put my settings back.

    You must remember the code, if you can't then take the phone and proof of purchase to an Apple Store.

  • My playlists show how many titles are in the playlist but does not show the list of titles

    my playlists show how many titles are in the playlist but does not show the list of titles. Is there a setting that I hit by mistake to hide the content?

    Perhaps you have made one column extra wide and the window isn't currently showing the Name column. Try resizing columns, turning off those that you don't need, or scrolling sideways.
    tt2

  • How do I open RAW images from DSC_RX100M3?  I downloaded Adobe DNG converter 8.4, but could not convert the images?

    How do I open RAW images from DSC_RX100M3?  I downloaded Adobe DNG converter 8.4, but could not convert the images?

    Small correction to what SSprengel wrote...
    The RX100M3 is supported only by version 8.5.  It sounds like you need a newer version.
    Photoshop Help | Digital Negative (DNG)
    -Noel

  • How do I easily find a photo in events? I found it in the photo view but can not identify the event it is in.

    How do I easily find a photo in events? I found it in the photo view but can not identify the event it is in.

    Right click on the Photo and choose 'Show Event'

  • My itunes are on windows 97. just got windows 7 laptop. when i load new software on my new laptop it shows all my windows 97 music/audiobooks but can not find the files. how do I link them

    my itunes are on windows 97. just got windows 7 laptop. when i load new software on my new laptop it shows all my windows 97 music/audiobooks but can not find the files. how do I link them

    iDevices are not and have never been backup devices.
    Authorizing a computer does not cause media to magically appear.
    Media is only where the user puts it.
    Copy the ENTIRE iTunes folder from the old computer to the new computer.

Maybe you are looking for

  • Out of memory errors shortly after saving Adobe LiveCycle Designer

    Stuck in a loop.  I am being forced to give up on a pdf that I put hours of work in. I can open the document and work in it for a while, but one large text box will instantly crash the program if I select it. The name of the text box is very long.  T

  • Wrong PDF on Security Alerts Page

    On the Security Alerts page (http://otn.oracle.com/deploy/security/alerts.htm) there is a link next to "Buffer Overflow Vulnerability in Oracle9iAS Reports Server Alert #35, 05 June 2002" which links to a document called http://otn.oracle.com/deploy/

  • Count values in master data

    Hello, If i want to implement a report that gives me the customers that had no sells for a period, i have to read the values from master data. But if i have to implement counters on that how can be done ? I don't want to change the data structure, ca

  • Unassign a task using Global Interactive activity.

    Hi, There is a task assigned to a particular user. I want to unassign that task from Global Interactive activity but it is not working. Steps followed by me are: 1. Global Interactive activity for unassigning any task at any time from the instance dr

  • Video icon not displayed

    I've been using Skype Video calls regularly, today the icon disappeared and in Skype Preferences it doesn't highlight... any suggestions?