Cache destroy and removing objects based on filter

Hi,
I have lined up a few questions to understand the ways we can destroy/remove cache entries or cache itself on a collective basis and not just the cache.remove(key).
1. How do I remove a group of keys from the cache? Say either I know the keySet or a keySet obtained based on a filter. I can see the Java doc says namedCache also implements queryMap and that supports keySet(Filter) but unlike Map.keySet(), the set returned by this method may not be backed by the map, so changed to the set may not be reflected in the map.
http://download.oracle.com/otn_hosted_doc/coherence/353/com/tangosol/util/QueryMap.html#keySet(com.tangosol.util.Filter)
Now that also means cache.keySet().removeAll() may not work. Can we confirm that, as another article http://wiki.tangosol.com/display/COH35UG/Data+Affinity shows an example way to use entryset or keyset and shows this line:
cacheLineItems.keySet().removeAll(setLineItemKeys).
2. Is namedcache.destroy() a blocking or non-blocking? Coz in one of our tests, we created a for loop of the following code:
     a. create cache.
     b. use cache.
     c. destroy cache.
And we expected at any point of time to have only one cache to be active on the cluster, however with the 500M as the high unit, we never saw evictions and indeed saw out of memory error. We had like 100 iterations. We expected destroy cache to basically delete the cache, thereby freeing the memory on the JVM. We only had one proxy and one storage in our test.
3. Is namedcache.clear() a blocking or non-blocking call? Although this does not necessarily removes the cache, it only unmaps all the entries in the cache.

Hi,
You can remove multiple cache entries based on a filter like this...
Filter filter = ...
cache.invokeAll(filter, new ConditionalRemove(AlwaysFilter.INSTANCE));...or on a collection of keys like this...
Collection keys = ...
cache.invokeAll(keys, new ConditionalRemove(AlwaysFilter.INSTANCE));Regarding non-blocking calls, presumably for clear() I would think that the call will not return until the cache is cleared (i.e. empty) otherwise you would get all sorts of potential problems. For cache.destroy() I am not sure what state the cache will be in when the call returns. I suspect if you call this from a client it only destroys the cache locally on that client and not throughout the rest of the cluste though - but I am sure someone could confirm this.
JK

Similar Messages

  • Adobe update that creates "Native Cache" "APSPrivatedata" and "Shared Objects" folders

    There was an Adobe Flash Player update (mine was on 1/4/2013) that started creating folders listed above. Since then 1) all Real Player conversions of flv (video) files to m4v (video) files take twice as long and 2) recording video mixes in Virtual DJ is impossible due to video lags.
    Windows XP, 32 bit
    Suggestions are appreciated..Thanks.

    Batteryboy1 the first errors I came across in your log file is as follows:
    02/12/14 10:09:54:697 | [ERROR] |  | OOBE | DE |  |  |  | 9756 | DF045: File corruption detected. Re-install the product & then apply the patch again. (Can not repair file "C:\Program Files (x86)\Common Files\Adobe\Adobe Photoshop CC\32 bit Photoshop dlls\AlignmentLib.dll")(Seq 3)
    02/12/14 10:09:54:697 | [WARN] |  | OOBE | DE |  |  |  | 9756 | DW063: Command ARKPatchCommand failed.(Seq 3)
    For this error I would recommend removing and reinstalling Photoshop CC.  It appears your current installation have become compromised.  There are several additional instances of this error within the log file you have posted.
    If you find that after reinstalling you experience similar errors in the future then please review any system optimizer/utility software which may be affecting the installations of your Adobe software.
    I also see additional information that the language files have been removed from your installation.  This is based off information in the log such as the following:
    02/12/14 10:08:13:634 | [INFO] |  | OOBE | DE |  |  |  | 10132 | DW023: The extension payload: Adobe Photoshop CC Chinese (traditional) Language Pack_x64_14.2_AdobePhotoshop14-zh_TW_x64 14.2.0.0 {B04260F0-494D-4A51-95B9-688297494D69} requires a parent with following specification:
         Family: Photoshop
         ProductName: Adobe Photoshop CC Chinese (traditional) Language Pack_x64_AdobePhotoshop14-zh_TW_x64
         MinVersion: 0.0.0.0
         This parent relationship is not satisfied, because this payload is not present in this session.
         This payload will be ignored in this session.
    This would also seem to support that a system optimization utility may have been utilized to remove the additional language files.  Previously the removal of these language files alone would prevent updates from being applied.

  • Collection: add(E), remove(Object)

    Hello, all!
    First of all, I guess very strange see interface collection with
    add(E) and remove(Object)... Why is there such collision?
    LinkedList<String> list = new LinkedList<String>();
    Object o = null;
    list.remove(o);NetBeans shows a warning for the last line: Expected type String, actual type Object.
    Eclipse and java compiler do not point to it. So how can I understand this? Netbeans fixed remove(Object) to remove(E)?
    Can you please help to understand the collision?

    mfratto wrote:
    The only warning I get in netbeans is to assign the return value, a boolean, to a new variable.I use netbeans 6.7. Probably, You use another version of netbeans from me, so you do not get the same warning.
    [see screenshort of the netbeans warning|http://i055.radikal.ru/0907/b2/6203e7e22d79.jpg]
    But what that warning is saying is that you declared the LinkedList to contain String objects, but you are trying to remove an Object (which is a parent of String). You can do that, it's just weird to do so. Why wouldn't you just pass a object, a String in this case, of the same type back into list.remove()?
    Edited by: mfratto on Jul 23, 2009 5:42 PMwithout sense, I just would like to understand netbeans behavior and "collision" of add(E) and remove(Object) methods.
    Edited by: aeuo on Jul 23, 2009 8:47 PM the screenshort was changed to more illustrative one

  • Do Vectors search and remove in log(n) time?

    Hi,
    I'm working on an application using a Vector to store a sorted list of numbers. Since it's sorted, it would be advantageous to use a log(n) algorithm for searching and removing items. So I'm wondering if the Vector.contains(Object) and Vector.remove(Object) methods know to search for items in a divide-and-conquer manner when it's sorted. I'd use these methods if this is so. Otherwise, I'm wondering if it would make my program run faster if I were to create my own contains(Object) and remove(Object) methods for searching and removing. Does anyone know what kind of algorithms the Vector class uses for these tasks?
    Gib

    Both Vector and ArrayList use an array as an underlying store.
    Thus a remove results in all the subsequent objects being moved up one.
    From the 1.4.2 source for Vector
        public boolean remove(Object o) {
            return removeElement(o);
        public synchronized boolean removeElement(Object obj) {
         modCount++;
         int i = indexOf(obj);
         if (i >= 0) {
             removeElementAt(i);
             return true;
         return false;
        public int indexOf(Object elem) {
         return indexOf(elem, 0);
        public synchronized int indexOf(Object elem, int index) {
         if (elem == null) {
             for (int i = index ; i < elementCount ; i++)
              if (elementData==null)
              return i;
         } else {
         for (int i = index ; i < elementCount ; i++)
              if (elem.equals(elementData[i]))
              return i;
         return -1;
    public synchronized void removeElementAt(int index) {
         modCount++;
         if (index >= elementCount) {
         throw new ArrayIndexOutOfBoundsException(index + " >= " +
                                  elementCount);
         else if (index < 0) {
         throw new ArrayIndexOutOfBoundsException(index);
         int j = elementCount - index - 1;
         if (j > 0) {
         System.arraycopy(elementData, index + 1, elementData, index, j);
         elementCount--;
         elementData[elementCount] = null; /* to let gc do its work */
    There is a call to arraycopy to move all the Object down one.

  • Eviction of objects based on aging time and not cache size

    Hi
    Ii am using a coherence cluster ( extend) and wish to implement an aviction policy for each object inserted into the cache.
    From the docs i have read i understand customized eviction policies are ALL size based and not time based ( mean eviction is triggered when cache is full and not when cache object aging time reached ).
    It there a way to implement such eviction ?

    Hi Reem,
    You can expire cache entries based on time by setting the expiry-delay in the cache configuration, for example
        <distributed-scheme>
          <scheme-name>SampleMemoryExpirationScheme</scheme-name>
          <backing-map-scheme>
            <local-scheme>
              <expiry-delay>10s</expiry-delay>
            </local-scheme>
          </backing-map-scheme>
          <serializer>
            <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
          </serializer>
          <autostart>true</autostart>
        </distributed-scheme>The above configuration expires entries 10 seconds after they have been put into the cache.
    You can find more information here: http://download.oracle.com/docs/cd/E14526_01/coh.350/e14509/appcacheelements.htm#BABDHGHJ
    Regards,
    JK

  • Error removing object from cache with write behind

    We have a cache with a DB for a backing store. The cache has a write-behind delay of about 10 seconds.
    We see an error when we:
    - Write new object to the cache
    - Remove object from cache before it gets written to cachestore (because we're still within the 10 secs and the object has not made it to the db yet).
    At first i was thinking "coherence should know if the object is in the db or not, and do the right thing", but i guess that's not the case?

    Hi Ron,
    The configuration for <local-scheme> allows you to add a cache store but you cannot use write-behind, only write-through.
    Presumably you do not want the data to be shared by the different WLS nodes, i.e. if one node puts data in the cache and that is eventually written to a RAC node, that data cannot be seen in the cache by other WLS nodes. Or do you want all the WLS nodes to share the data but just write it to different RAC nodes?
    If you use a local-scheme then the data will only be local to that WLS node and not shared.
    I can think of a possible way to do what you want but it depends on the answer to the above question.
    JK

  • How do I do to add and remove Shape3D objects dynamically from TransfGroup?

    Hi, everyone,
    How do I do to add and remove Shape3D objects dynamically from TransformGroup?
    I have added two Shape3D objects in the TransformGroup and I wanted to remove one of it to add another. But, the following exception occurs when I try to use �removeChild� :
    �Exception in thread "AWT-EventQueue-0" javax.media.j3d.RestrictedAccessException: Group: only a BranchGroup node may be removed at javax.media.j3d.Group.removeChild(Group.java:345)�.
    Why can I add Shape3D objects and I can�t remove them? Do I need to add Shape3D object in the BranchGroup and work only with the BranchGroup? If I do, I think this isn�t a good solution for the scene graph, because for each Shape3D object I will always have to use an associated BranchGroup.
    Below, following the code:
    // The constructor �
    Shape3D shapeA = new Shape3D(geometry, appearance);
    shapeA.setCapability(Shape3D.ALLOW_GEOMETRY_READ);
    shapeA.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);
    shapeA.setCapability(Shape3D.ALLOW_APPEARANCE_READ);
    shapeA.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
    Shape3D shapeB = new Shape3D(geometry, appearance);
    shapeB.setCapability(Shape3D.ALLOW_GEOMETRY_READ);
    shapeB.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);
    shapeB.setCapability(Shape3D.ALLOW_APPEARANCE_READ);
    shapeB.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
    BranchGroup bg = new BranchGroup();
    bg.setCapability(ALLOW_CHILDREN_READ);
    bg.setCapability(ALLOW_CHILDREN_WRITE);
    bg.setCapability(ALLOW_CHILDREN_EXTEND);
    TransformGroup tg = new TransformGroup();
    tg.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
    tg.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
    tg.setCapability(TransformGroup.ALLOW_CHILDREN_READ);
    tg.setCapability(TransformGroup.ALLOW_CHILDREN_WRITE);
    bg.addChild(tg);
    tg.addChild(shapeA);
    tg.addChild(shapeB);
    // The method that removes the shapeB and adds a new shapeC �
    Shape3D shapeC = new Shape3D(geometry, appearance);
    shapeC.setCapability(Shape3D.ALLOW_GEOMETRY_READ);
    shapeC.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);
    shapeC.setCapability(Shape3D.ALLOW_APPEARANCE_READ);
    shapeC.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
    tg.removeChild(shapeB);
    tg.addChild(shapeC);Thanks a lot.
    aads

    �Exception in thread "AWT-EventQueue-0"
    javax.media.j3d.RestrictedAccessException: Group:
    only a BranchGroup node may be removed I would think that this would give you your answer -
    Put a branch group between the transform and the shape. Then it can be removed.
    Another thing you could try: This doesn't actually remove the shape, but at least causes it to hide. If you set the capabilities, I think you can write the appearance of the shapes. So, when you want to remove one of them, write an invisible appearance to it.

  • Diff between object based and ob. oriented

    diff between object based and ob. oriented

    Object-oriented requires at least three factors:
    1. Encapsulation: Combining data and the methods that manipulate the data into a self-contained unit called an "object" in which the data is hidden from the user and only the method interface is visible.
    2. Inheritance: Ability of a class to extend the features of another class by obtaining all the public features of the other class while adding its own specialized features (Example: Great Dane inherits from Dog)
    3. Polymorphism: The ability to perform "late binding" by invoke methods of a subclass on behalf of its superclass. (Polymorphism includes other things and it difficult to explain.
    If a language does not include all three, it is called "object-based." Visual Basic 6 is object-based, because it allows you to define classes that encapsulate, but doesn't support an inheritance hierarchy nor polymorphism.

  • Caching RAW and LONG RAW objects

    Hi,
    Is there any way to cache RAW and LONG RAW object like BLOB caching?
    Thanks

    Is there any way to cache RAW and LONG RAW object like BLOB caching?What is the version?
    to fetch long fetch size character of bytes you must use any one of below three.
    1)Primary key
    2)ROWID
    3)Unique columns

  • Destroy/remove object /movieclip

    Hi,
    how do I completly remove a movieclip that is created as a
    new class.
    I have an event listener that does a removeChild like this
    e.target.parent.removeChild(e.target);
    is this enough or do I have to 'null' the object? I can't
    just do
    'e.target = null' because the property is read only. Will the
    internal
    garbage collection do the rest for me if I have no references
    somewhere
    else?
    TIA

    That's no fun then; apparently I wasn't accurate.
    The simple matter is, that garbage collection is automatic
    and removes an unreferenced object when it needs to, so as long as
    you remove all reference to the object you wish to remove,
    including the event listener, then at some point the garbage
    collection will run and empty your item from memory. Sorry for any
    confusion.

  • How do I Isolate an object  and remove it's background?

    I'm curious to ask if it's possible to isolate an object in a photo and remove it's background so that I can put the object somewhere else eg a web page. Can aperture 3 do it or do I need to buy a plug in?
    Any suggestions are appreciated - thanks!

    Still need Photoshop or Photoshop Elements to use Topaz Remask.

  • Fiori Launch Pad and Object Based Navigation (OBN)

    I was wondering if anyone knows how the Fiori Launch Pad works with Object Based Navigation (OBN)...
    The scenario I am imagining is that I have a tile defined on the Fiori Launch Pad that opens a Web Dynpro ABAP Application - within that application there is a user action that triggers an OBN call. This is quite a common scenario particularly with POWLs.
    In the Portal or NWBC these OBN calls are managed and resolved at runtime based on the user's role. Will this also work with the Fiori Launch Pad or must the Launch Pad be embedded within the Portal or NWBC for this scenario to work?
    I have noticed that if you define a Web Dynpro ABAP application in the Fiori Launch Pad it by default wraps that app in the NWBC (HTML version) in a new window - I am guessing that maybe this is how it then handles OBN resolution (e.g. via NWBC).
    Any insight would be appreciated.
    Thanks in advance,
    Simon

    This document posted by Jamie Cawley doesn't fully answer my question above but it helps in that it explains how the Fiori Launch Pad has it's own implementation of Object Based Navigation called "Intent based Navigation"
    Fiori Launchpad Concepts
    I hope SAP has a solution to cater for OBN in "older" applications such as Web Dynpro ABAP POWLs. I can imagine that many customers will have a hybrid launch pad consisting of both Fiori/UI5 and Web Dynpro Applications for some time.

  • Videos won't load on specific sites using Safari and FireFox. I've cleared the caches, reset Safari, removed and reinstalled Flash player, downloaded newest update.

    Videos won't load on specific sites using Safari and FireFox. I've cleared the caches, reset Safari, removed and reinstalled Flash player, downloaded newest update.

    Videos won't load on specific sites using Safari and FireFox. I've cleared the caches, reset Safari, removed and reinstalled Flash player, downloaded newest update.

  • Object Based Navigation and several Logon Pages

    Hi SAP Experts,
    when searching help.sap.com for object-based navigation, I get a very detailed and helpful description about what Object-based navigation is:
    "The primary capability offered by OBN is that the data returned to the user during navigation is role-based and accessed dynamically during runtime. While navigating in the portal, users receive different kinds of data from iViews based on business objects, according the needs and requirements of their role in the organization. In other words, two different users may perform the same navigation operation, for example, drag the same link from the same iView onto the same target iView, and the data returned to each of them will be different because it is role dependent. This is the work of business object operations."
    However it is not specified in the Help, if I can use these navigation objects also for several Logon Pages for different users. Does anybody of you have experience with that?
    I know that I can handle different Logon Pages by defining a Portal Gateway Mechanism. Is that still necessary or can I handle everything with OBN?
    Thanks in advance and best regards
    Alex

    Hi Parameshwari,
    Object-Based Navigation (OBN)is the portalavigation scenerio. the navigation targets are defined by operations of a business object.
    Object-based navigation (OBN) offers portal users an additional method of navigation based on business objects from productive back-end systems. From the Portal Content Catalog, the business objects are imported from systems in the Portal Content Directory (PCD) to the Business Objects folder in the Portal Content Catalog, where they can be arranged logically into sub-folders as desired.
    The primary capability offered by OBN is that the data returned to the user during navigation is role-based and accessed dynamically during runtime. While navigating in the portal, users receive different kinds of data from iViews based on business objects, according the needs and requirements of their role in the organization. In other words, two different users may perform the same navigation operation, for example, drag the same link from the same iView onto the same target iView, and the data returned to each of them will be different because it is role dependent. This is the work of business object operations.
    Webdynpro java:
    http://help.sap.com/saphelp_erp2004/helpdata/en/3e/97e33d7f9c47af85a2543e3a2cce4c/content.htm
    WebdynPro ABAP:
    http://help.sap.com/saphelp_sm40/helpdata/en/e4/f86f4132f15c58e10000000a1550b0/content.htm
    Basic example OBN:
    http://www.urz.uni-heidelberg.de/saphelp/helpdata/DE/dd/f8dd7995ac4100adc9af417e044063/content.htm
    Hope this information helps you!
    Thanks & Regards,
    AshwinChandra Girmaji

  • Oracle JDBC driver and the object types cache

    Hi there,
    Oracle JDBC Developer's Guide and Reference says (version 11gR1):
    Oracle JDBC drivers cache array and structure descriptors. This provides enormous performance benefits. However, it means that if you change the underlying type definition of a structure type in the database, the cached descriptor for that structure type will become stale and your application will receive a SQLException exception.http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/oraoot.htm#g1104293
    That is the problem we are having here... We have web services deployed to WebLogic server that use custom object types. Every time we have to change an object type definition the web services stop working (the error ORA-00902: invalid datatype is raised) and the only solution is to restart the JDBC data source which is quite disruptive to the development process.
    Is there a workaround to disable that "feature"?
    Thanks
    Luis

    Luis Cabral wrote:
    jschell wrote:
    Although if you are changing the object structure then the code to deal with it must change as well. So, especially in developement, why is restarting a problem?It is not that restarting per se is a problem. Here us developers do not have the required privileges to restart the JDBC pool and we have to ask the DBA to do it, and sometimes he is not immediately available. It is not a big thing but this can impact the development process.Your development process is hideously flawed then.
    The pool exists in the JEE server. And from your first post it seems that you have permission to restart that but not to access the management console. It is ridiculous to have access the the former and not the later.
    Not to mention that you should have your own JEE instance to develop on. Actually it is weird to me that a DBA would even be touching a JEE server. The competent ones I know don't even know how to do that. They know the database not the application servers.
    >
    In addition, having to restart a whole JDBC pool just because you changed a database object definition does not seem very flexible to me. Such issue does not exist in other connection types, for instance in OCI connections, that is why I thought there should be an option to turn it off if required.
    Well specifically you have to restart the pool because you were USING the object that changed.
    And I am rather certain that you can turn off the pool entirely.
    Even in production, I reckon that this may have a negative impact. For instance, say that you need to deploy a hot fix for a bug in one application that involves the re-creation of one single object type. This means that the whole JDBC pool, which may be used by other applications, may have to be shut down just because of that single object.Good point.
    I suggest you stop using complex objects in Oracle. I suspect that would eliminate the problem completely.

Maybe you are looking for

  • Firewire drives do not show up on network

    I have a G5 with 2 external drives, 1 firewire, 1 USB I have a G4 with 2 external drives, both firewire. When these computers are networked, The G5 sees the internal drives from the G4. The G4 sees the internal drives from the G5, as well as the conn

  • Jabber and CCME

    Hi all, I have installed VoIP system at customer Cisco Call Manager Express (CISCO 2821). It is possible somehow connect Jabber client to CME, that could do call from Jabber through Cisco and than out. Does anyone has such experience!! Regards, Damja

  • How to change the width for af:selectManyShuttle by skins

    i need to change the width for selectManyShuttle by skin i can do that by change the width for .AFFieldText but this method change the all select* and textfiled width,so i just want to change the width for selectManyShuttle component. and i hope to k

  • Yoikes ... iphone 3g overheated now not accepting charge or doing anything

    Help would be HUGELY apprecited was last week in India and used my iphone most days ... had it on charge over night about 5th night there .. next morning took a few photos and had breakfast - went to take another picture to find my iphone 3g extremel

  • Fullscreen thumbnail size

    When I went to the fullscreen editing mode, I made it so that I could scroll through 3 rows of pictures. But when I put the setting back the the default 1 row, the size of the thumbnails remained small. Is there any way that I can make them return to