MapTrigger behavior with declarative registration

Hello
Please help me to better understand the behavior of MapTrigger. I try to use a MapTrigger that inserts changes cache 'Bar' when the 'Foo' Cache changes. I register my BarCacheLoaderTrigger in Foo cache declaratively as follows
 <distributed-scheme>
      <scheme-name>Foo-distributed</scheme-name>
      <service-name>FooDistributed</service-name>
      <backing-map-scheme>
        <local-scheme>
          <scheme-ref>default-binary-backing-map</scheme-ref>
        </local-scheme>
      </backing-map-scheme>
       <listener>
                <class-scheme>
                    <class-factory-name>com.some.package.BarCacheLoaderTrigger</class-factory-name>
                    <method-name>createTriggerListener</method-name>
                </class-scheme>
            </listener>
      <autostart>true</autostart>
    </distributed-scheme>
Here are my questions:
-Is insitu trigger executed each enabled storage node where the partitions of Foo? It turns on the side server only, or is it also get instantiated on each client that gets a reference to the memory cache?
-It seems that the instance of MapTrigger is created when I opened a disabled customer console storage to query the cache of Foo. It should not only get instantiated on active storage nodes?
-When my CacheLoader program runs, filling hundreds of objects of Foo, I observe the severe pretension to query Foo cache (size query takes 30 seconds to get back). This happens when the trigger was not present. Is this normal?
-What is the implication of getting a NamedCache (for Bar cache) reference with each unique performance of map of relaxation (in the process method)? I can't get the reference once to the instance level and use it for the whole of the cycle because he complained about an exception not serializable the trigger. What is a good model for what I'm doing?

Please notify

Thank you
Sairam

SKR wrote:
Thanks for the reply, Robert

Yes, the two caches are configured with different cache services. The remote control and the application of filter are dear to the processing stage. I like the idea of using KeyAffinity + BackingMapContext for the treatment of trigger and my keys are associable. I guess it would only work if the caches are managed by the cache, service unlike access via NamedCache interface of in a MapTrigger, right?

Yes, they would need to be in the same cache key affinity service.

Once you have affinity, so you can transfer affine them entered in the cache of customer research easily, and you can easily access an index on the getCustomerId by the BackingMapContext of the client cache search to remove existing entries:

BackingMapContext customerSearchCacheBackingMapContext = ((BinaryEntry)entry).getBackingMapContext().getManagerContext().getBackingMapContext(CacheName.CUSTOMER_SEARCH.getNameString());
MapIndex customerIdIndex = (MapIndex)customerSearchCacheBackingMapContext.getIndexMap().get(new ReflectionExtractor("getCustomerId"));
Set customerSearchInternalKeys = (Set) customerIdIndex.getIndexContents().get(custId)
for (Binary internalKey : customerSearchInternalKeys) {
   InvocableMap.Entry customerSearchEntry = customerSearchCacheBackingMapContext.getBackingMapEntry(internalKey);
   if (customerSearchEntry.isPresent()) {
      // this should always be true in your case, but just in case
      entry.remove();
   }
}

You can use code similar to the following to insert new objects of customer search:

Converter keyToInternalConverter = customerSearchCacheBackingMapContext.getManagerContext().getKeyToInternalConverter();
Map newobjects = addCustomerSearchObjects(customer);
for (Map.Entry newEntry : (Set) newobjects.entrySet()) {
   InvocableMap.Entry customerSearchEntry = customerSearchCacheBackingMapContext.getBackingMapEntry(keyToInternalConverter.convert(newEntry.getKey()));
   customerSearchEntry.setValue(newEntry.getValue());
}

Don't you see any problem running this as part of a logic of MapTrigger, or advise you to use an EntryProcessor for this?

This MapTrigger and EntryProcessor would probably be the same thing (you'd have to deserialize the value of the entry anyway).

Now, there may be some incompletely implemented the feature in consistency that can prevent the insertion of new entries of triggers (I am not sure, but I recall there were a few problems for this scenario with the interceptors again), but this approach can be extended to a wrapper EntryProcessor instead of a MapTrigger that would probably work. If this seems to work, so he does. If it is not the case, then you'd get exceptions or NULL values for the entries in getBackingMapEntry but as I said, I do not remember the precise scenario for these issues.

This doesn't have to be synchronous with the customer operation put and I am able to run asynchronously if the performance is affected by this.

According to me, other operations will be not too expensive (even if random has noticeable cost).

For the run asynchronously, please look at my previous post to get suggestions (using another thread or a new order of control inserted directly in the same partition model). You should test your system to see if it is necessary to make asynchronous.

Best regards

Robert

Tags: Fusion Middleware

Similar Questions

  • Problems with the registration of the guarantee for my Satellite A200

    I tried to sign up for my Satellite A200 laptop computer online and it did not work. I then had to send info and proof of purchase for Toshiba and heard nothing yet.
    Emailed Toshiba and heard nothing yet. Number 117 of what laptop Toshiba receipt for support and services. It is what makes me look to buy a Toshiba.

    What service? What support? All I want to do is register my warranty. Is someone there?

    Hello

    I have 2 different Toshiba notebooks and I could save the guarantee of all my books!
    These two laptops are European model Toshiba and I could register the warranty on Toshiba's European support page!

    If you have any problems with your registration, then contact the ASP in your country and ask for help. If they have not responded until now then contact guys.

    I put t know what's wrong in your case, but my recording of security went well and it was not a problem!

    Then contact the guy and ask for help! It cannot be that difficult.

    Good bye

  • Unexpected behavior with the Option "record in the result.

    Hello

    I have unexpected behavior with the Option "record in the result.

    I have a few steps in the subsequence 'X', this subsequence passes a Boolean parameter. According to the value of the parameter I change the "Recorgind results" Option to report it or not. The thing is that if 'result Recorgind' set at race time I modofy by changing the value of Step.ResultRecordingOption to "Enable" and "Disable", the step is not reported until the same sous-suite 'X' is called for the second time (without changing the parameter passed).

    For example: (Preconditon: result Recorgind Option of all value sous-suite x are defined as Disable)

    1 CallSubsequenceX(Parameter: Enable)

    2 CallSubsequenceX(Parameter: Enable)

    3 CallSubsequenceX(Parameter: Disable)

    4 CallSubsequenceX(Parameter: Disable)

    Expected result:

    1. measures have been reported.

    2. measures have been reported.

    3. measures have not been reported.

    4. measures have not been reported.

    Result:

    1. measures would not same value Step.ResultRecordingOption has been changed to 'enable '. (Not Ok)

    2. measures have been reported. (Ok)

    3. measures reported same value Step.ResultRecordingOption has been changed to 'disable '. (Not Ok)

    4. measures have not been reported. (Ok)

    I use TestStand 2013 (5.1.0.226)

    Thanks in advance.

    -Josymar.

    Hi josymar_guzman,

    I just review the sequence and indeed we´re experience unexpected behavior with the Step.ResultRecordingOption callback. By a reason when you run the callback in the expression before each step section, the statement runs only until the next sequence is called, which is not what we want.

    To avoid this, you can place a statement before each step of the sequence, so you can change the State of the Option "record result" for the sequence running (and it is only the following). You can try something like this

    where the expression of the statement will be the recall "RunState.NextStep.ResultRecordingOption is YourCondition". With this, we guarantee that the results of the next step will be saved or not. I also remove the expression in the expression prior to each step section, because the condition is now on the statement before each step.

    I tried and it works fine. I´ll set the sequence that you share with me, with the changes. I hope this will help you and solve your problem.

  • Weird behavior with Signal to simulate and loops

    I'm having a weird behavior with Signal to simulate and while loops. Attached a photo of my program. The problem I have is that when I use Stop to stop inside while loop, then use to restart the inner loop, simulate Signal instantly generates a bunch of points of data between when I pressed Stop and Go. By example, if I stop for 5 seconds, wait 5 seconds, then press Go, it will instantly generate data for t = 5 t = 10. What I need is for the generation of signals to stop when I press stop and continue where it left off when I press Go. How can I accomplish this? I have no idea why he exhibits the behavior described in the first place.

    Hi optometry.

    Can you give us a screenshot of the configuration window for the VI express to simulate signal? I was able to reproduce the problem when I used "Simulate the time of acquisition" at times, but the VI's are featured as you described you wanted when I used "run as fast as possible." Have you tried this setting?

  • Strange behavior with Scan function

    Hi, I see some weird behaviors with the scan function.  Here's a code (for Interactive execution) window which illustrates what I'm struggling with:

    #include 
    static double value;//    1234567890123456static char buffer[20] = "-  24.612 g    ?";
    static int scanneditems;
    static unsigned char sign, stable;
    static char unit[6];
    
    scanneditems = Scan(buffer, "%s>%c[u]%f%c[d]%s[w5y]%c[u]", &sign, &value, unit, &stable);
    

    The buffer I'm scanning has five parts.  The first character is a sign, the next 8 characters is a floating point number, then there is a space that just throw, then five characters is a string that describes the unit, and the last character is a question mark if the reading is unstable or a space otherwise.  The problem is with the last character.  When I run the above code, the value of the variable 'stable' is 32 (space), when I expect a 63 (question mark).  The other points seem to parse correctly, including the double value and the 'unit' char array that contains [g] [space] [space] [space] [space], which is exactly what I expect that it contains.

    It seems I'm missing something obvious, probably something to do with the way that the scan function manages the spaces, but I just can't understand what it is.  Thank you.

    I'm not sure about how Scan treats spaces, but if you check NumFmtdBytes () after the scan you see 12, which means that it has scanned only the 'g' (fill the rest of 'unit' with spaces according to the modifier there) and read the character immediately following the stability.

    This line correctly reads the entire string and returns bytes 16 analyses by the function, which is what is expected.

    scanneditems = Scan (buffer, "%s > %c [u] %f %c [d] %s [-w5t] [u] %c", & sign, & value, unit, & stable);

  • No acrobat pro XI come with the registration key?

    The Acrobat Professional XI is provided with a registration key?

    Demo version - no

    Retail version - Yes

    Subscription version - no

  • strange behavior with script times

    Hi all

    I have strange behavior with one of my scripts, and I can't understand where is the problem.

    Before you post the code, here's the principle.

    My form has two fields of time: "Time of Injection" and "Post injection time.

    The script runs when the output of "injection time" event and look if the injection time is before time "post injection.

    Here is my code:

    //get the value of the field "Injection time"
    var injection = this.formattedValue;
    
    //create an new Date object
    var injectionTime = new Date();
    
    //split the string to get the HH MM and SS values of the formattedValue (HH:MM:SS)
    var injectionTimeHoursString = injection.substr(0,2);
    var injectionTimeMinutesString = injection.substr(3,2);
    var injectionTimeSecondsString = injection.substr(6,2);
    
    //parse the strings into integer
    var injectionTimeHoursInt = parseInt(injectionTimeHoursString);
    var injectionTimeMinutesInt = parseInt(injectionTimeMinutesString);
    var injectionTimeSecondsInt = parseInt(injectionTimeSecondsString);
    
    //set the integer values into my Date object
    injectionTime.setHours(injectionTimeHoursInt, injectionTimeMinutesInt, injectionTimeSecondsInt,0);
    
    
    //do the same for the other time field "Post injection time"
    var post = post_injection.post_time.formattedValue;
    var postTime = new Date();
    var postTimeHoursString = post.substr(0,2);
    var postTimeMinutesString = post.substr(3,2);
    var postTimeSecondsString = post.substr(6,2);
    var postTimeHoursInt = parseInt(postTimeHoursString);
    var postTimeMinutesInt = parseInt(postTimeMinutesString);
    var postTimeSecondsInt = parseInt(postTimeSecondsString);
    postTime.setHours(postTimeHoursInt, postTimeMinutesInt, postTimeSecondsInt,0);
    
    
    //calculate the difference between both
    var diff = postTime.getTime() - injectionTime.getTime();
    
    //if the difference gives a negative result, display a message, empty the fields and set focus
    if(diff<0) {
         xfa.host.messageBox("The time of injection should be sooner than the time of post-injection activity measure.\n\nPlease re-enter correct times.","Incompatibility of times");
         this.rawValue = "";
         post_injection.post_time.rawValue = "";
         xfa.host.setFocus(post_injection.post_time);
    }
    

    The code seems to run pretty well... except with certain values.

    If postTime is 12:00

    and injetion is 12:04

    I get the error message and everything, so it's OK

    BUT

    When postTime is 12:00

    and injectionTime is 12:08

    No message! as if the difference was not negative! (the difference is zero...)

    When I display the time in a messagebox, 12:04 12:04:00 GMT blah blah... gives but 12:08 gives 12:00:00 GMT etc...

    same problem with 12:09, but not 12:10 for example...

    Any thoughts?

    Thank you.

    Thank you, but since I'm used to javascript, I'll stick to it.

    I understand the problem. It's a javascript with the ParseInt method bug!

    Check here: http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256C85006A6604

    parseInt("08") = 0.

    How to lose 2 hours for a stupid bug...

  • Declairing Variables in behavior with ASP VBScript

    Okay, I don't know if it a problem outside of VBScript, then maybe this issue is just there. When you declair variable in VBScript, you can not declair the variable of the same name twice. If you do, you get an error.

    So the problem is, if I insert an update, insert, and delete behavior on the same page, the code generated by DW declairs common variable. So when you run the page, you get this error of statement.

    I normally just go into the code and comment out all but the first instance of the statement. That works very well, but then disappears behavior in the behaviors panel. OK, so this isn't really a big problem because I hand code fairly easily.

    However, I like the listed behaviors, if nothing else, so I can see a summary of what I set in the behaviors page. Especially if it's a page I have not messed with the ina while.

    Is there a work around that? I have not tried going in and editing behavior. Maybe somehow I could do this and just delete the joint declarations? Any ideas?

    Yes it is possible,

    Check out this example: http://labs.adobe.com/technologies/spry/samples/form_submission/Submit_and_Validate_Form.p hp.html

    and

    http://labs.Adobe.com/technologies/Spry/samples/form_submission/SubmitFormWithXHRSample.Ph p.html

    for the examples :)

  • Strange behavior with the function «Help in command line»

    So I do a little playing with the opening of the files compiled help (.chm) with the command-line help feature, and I saw a strange behavior when trying to index multi-level access keywords. According to the documentation, if you set the 'Key' operation, you can enter a value for ' string to search for "to access this section. The more precise help that:

    If this string contains a keyword index, the string must match the key of the index as it appears in the help index file. To access a topic with a multilevel index keyword, enter the keyword of the top-level index, a colon and the keyword of the second level index. Do not separate the elements with spaces. For example, a chain of error codes: GPIB jumps about a subject with a keyword of top-level index of error codes and a second level keyword index of GPIB.

    All right, seems simple enough. Except that when I tried, I couldn't work, even with the example provided. I tried the following simple test:

    Opens the help file, but it opens to this page, not to the page ' error codes: GPIB "non-descript. I saw this in 8.2 and 8.6. Anyone have any success with access to a multi-level keyword?

    Note - side

    Curiously, the Index for the help lvconcepts.chm file looks like this:

    In other words, the input index text is just "GPIB", but the text that appears in the keyword field is "codes error, GPIB. I'm curious to know how this was accomplished. I decompiled the lvconcepts.chm file and watched the .hhk file, and it is not immediately obvious to me. (By the way, if you try to use "error codes, GPIB" it does not either).

    Hello

    Please contact National Instruments!
    It is a very strange behavior.  I tested out and seen the exact
    same results you are experiencing.  This was reported to R & D (AUTO ID # 130246) for further investigations.
    From what I can tell the a possible workaround solution that we have documented
    in the post of root Canal.  I can't continue to look into this in order
    to see if there is no other workaround solution or a reason why it is
    run in this way.  Thanks much for the feedback!  If
    you have any other questions on this subject please post them here.
    Have a great day!

  • Inconsistent behavior with Ocean Optics LabVIEW driver

    Hello

    I noticed an odd behavior when using the USB2000 Ocean Optics spectrometer. When I use the driver tools read the waveform, I get a waveform of pixels in length 2022. When I use the Ocean Optics (SprectraSuite) software I have a waveform of length 2048.

    I first noticed this problem when I was looking at the spectrum of a light source that is known to be ~ 870nm. Using the LabVIEW driver, I saw a peak at ~ 857nm, but using the Ocean Optics software, I saw a pic to 870nm as expected. Please let me know if you can give no indication to this problem. Thank you

    Gregory

    Just to be tied it on, I don't end up the front of the table of the spectrum with zeros to fill. It's certainly something that would deal with Ocean Optics (or the writer of the drivers). I do not change the driver because he could shoot me in the foot when you use one of the other patterns.

    Also, I noticed that for the USB2000 Set integration time VI, the time units are milliseconds. The USB4000 (and what is suggested by the drivers/examples) use the microseconds.

    Hope that these drivers can get an update soon!

  • Is this behavior with the uploaded image is correct?

    Hello

    I noticed a strange behaviour and I don't know if it's supposed to be like that or not.

    BB Pearl 8100 4.5.0.55

    I have an application that downloads an image using http and stores using fileconnection in/store/home/user/myapp/myfolder.

    Everything is ok, but after a device is reset, I can see inside the multimedia/pictures/my pictures folder I create (MyAccount) with the image inside.

    Is this correct or is it some sort of bug? I thought that my images was linked to the SDCard/BlackBerry/pictures.

    Concerning

    It is the expected behavior.  If you don't want the BlackBerry handheld to identify your file as an image you can save it with a custom extension.

  • Strange behavior with postGlobalEvent and eventOccurred()...

    Hello world

    I have a browser plugin for my application that will do two things:

    Firstly, when the BlackBerry browser is forwarded to a Web page with a particular MIME type, the browser plugin will say my application to go to the foreground. It works without any problem.

    Secondly, the browser plugin will display a global event at my request. My request, making use of eventOccurred(), will look for this event and the EC type-approval, it will execute an authorize() method that I have. This also works. However, I notice some strange behavior:

    The first time my application launches the BlackBerry browser and goes to the page specified (with a custom MIME type), everything works fine. If I had while my application to launch the browser and do it AGAIN, my authorize() method is running TWICE. If I open the browser of my application for the third time, so my authorize() method is started THREE times. See the model?

    .. .This is all this without leaving my application. If I had to leave and then start my application again, the 'sequence' prior would begin again. Thus, it seems that whenever x times that I repeat this process, the eventOccurred() method will receive x events.

    Here are a few snippets:

    public class Events {
        final public static int EVENT_AUTHORIZE = 1;
        final public static int EVENT_OTHER = 2;
    }
    
    manager.postGlobalEvent(pid, 0xCAFEBABE, 1, 0, null, null);
    
    public void eventOccurred(long guid, int event_type, int arg2, Object arg3,
                Object arg4) {
            if (guid == 0xCAFEBABE) {
                switch (event_type) {
                case Events.EVENT_AUTHORIZE:
                    authorize();
                    System.out.println("EVENT EXECUTION");
                    break;
                case Events.EVENT_OTHER:
                    break;
                }
            }
    
        }
    

    Can we see what is happening here? I've been "racking my brain" on this one for a while now...

    Thank you!

    "Thus, this can work any time the class is instantiated." The class is instantiated just before I open my browser".

    Application.getApplication().addGlobalEventListener(this);
    

    If you call the above (by instantiating your class) every time that you open the browser, applications to register this event listener again and again.

    If you're going to do it this way, make sure removeGlobalListener you when your application is done processing.

    "Can I make addGlobalListener when my application starts even if this class does not implement GlobalEventListener?"

    You can always have your UiApplication implement GlobalEventListener or just instantiate a new object that implements it in the constructor of your UiApplication.

  • I have a problem with the registration of items on the computer.

    Original title: cannot save items.

    Hello everyone, today I came across this problem in my Windows 7. I can't choose a whee folder to save my things. I try to save the document and it won't let me choose the destination folder. The same thing with images.

    I'll let a picture showing my problem.
    http://ImageShack.us/photo/my-images/4/m0zy.jpg/
    You see, records do not yet show upward.
    Thanks in advance.

    1 if this is the case in many applications, then it seems to be a problem of Windows 7 rather than an application problem.  The window that appears correctly a component of Windows 7 that is running SFC is appropriate.

    1.1 open a command-line prompt Admin by typing cmd in the search box of the start menu, then right click on the shortcut that is offered & selecting run as Admin.

    1.2 enter the following, and then press return

    sfc/scannow

    1.3 launch SFC at least three times to give him a good chance identification & correction of errors.  If it continues to declare that he has found errors that it cannot correct then after an update here & I can propose other measures [for now, I think that this analysis of disk / chkdsk may must be performed and start with Safe Mode & own procedures would be useful in ensuring that it is indeed a problem Windows & is not a problem of application and if yes] Plus short SFC from a Setup disk could fix things].

    2 [Edited - extra comment deleted; perhaps ImageShack had problems at that time] pointed out that, when you put a link in a question, you can press the SPACEBAR by more & system him will automatically convert into a hyperlink.

  • unexpected behavior with vpn, clientless ssl and smart tunnels on ASA 5510

    Hi there, hope someone can help

    I am able to set up a smart tunnel for an application and everything works fine, however...

    Without smart tunnel, the user must navigate the portal interface (because of how he encapsulates urls and basically acts as a proxy), it is too beautiful and good and expected behavior. If a user does not enter a URL in the portal URL entry (only enters the normal address bar) she takes them outside the clientless ssl vpn portal.

    Now too the point to start a smart tunnel, URL, the user types in the normal address bar is not encapsulated in the device URL, although they are still placed through our network (and note, the intelligent application of tunnel is not the browser, which is be IE). How can I know it? sites that would be blocked by a web filter are blocked with smart on but not PVD tunnels with smart tunnel.

    I need to know if this is intended behavior or not and how and why this is happening?

    Thanks in advance

    In my view, this is how it works. If you are referring to this doc:

    https://supportforums.Cisco.com/docs/doc-6172

    Smart tunnel is functioning all or nothing. Which means once you turn it on for a specific process or a specific bookmark, all your traffic for this process (and the browser you are using to open the SSL Clientless session ) will pass through the ASA.

    Example: Enable option ST for a process or bookmark #1 (which connected IE used to login). Opening a separate instance of the IE browser will be all traffic through the ASA, tunnel, if the new browser window belongs to the same process. All tabs on the movement of this browser browser will be smart tunnel, even to Favorites (ie. #2 favorite) are not specifically the chip in the tunnel. You must use a different browser (ie. (FireFox) in this case, if you want some of your traffic (ie. #2 favorite) is not to be smart tunnelees.

    I hope this helps.

  • Problems with the registration of the CTM to CTSMan

    Hi all

    Is there a constraint of time return on registration of a CTMS to CTSMan.  We have 2 CTMS on Slough, United Kingdom and the other in Ohio, United States.  Our CTSMan is also in Slough.  The Ohio CTMS base seems to be okay at the beginning, but then the errors appear where CTSMan said Community trade marks could not authenticate.   The credentials are correct, so my suspicion is that CTSMan expects that there will be a recognition of the Ohio CTMS fast he is received (the round trip time is 109ms)

    What sounds right?  What is the recommended method to resolve this problem?

    Sincerely, Glen

    Hi Glen:

    If 109ms is RTT of the Ohio CTMS CTM in Slough, which should be good.  Finally, I checked the default deadline for registration was two seconds.

    In your CTS-Manager, you have your servers of CTM is entered with the IP address or host name?  CTS-Manager/CMTS is configured with specific DNS servers?  CTS-Manager/CTMS versions (I assume you're in 1.7 or 1.8 on both)?

    A more common cause of what you describe is lack of DNS. Make sure you have your DNS servers configured to solve for the CTM in Ohio, in addition to the MLC to Slough.  Periodic audits are are on the Community trade mark and of Community trade marks.  It is in Chapter 8 of our of CTS-Manager Install/Admin guide:

    http://www.Cisco.com/en/us/partner/docs/Telepresence/cts_manager/1_7/Admin/ctm_instalCTS_M.html

    You can issue "utils network host" from the CLI of the CTS Manager, and "utils network host the CLI of CTM to see if either fail to solve.»

    "Configuration of DNS for before name resolution is required for CTS-Manager and all servers configured in the CTS Manager.  All server names can be resolved by the DNS of CTS-Manager and CTS-Manager server name can be resolved by DNS to all other servers. »

    Also, make sure that the appropriate ports are open between the CTMs and CTM (if the servers are secure and it is a new installation, I would definitely check this). Here is the list of ports:

    http://www.Cisco.com/en/us/partner/docs/Telepresence/security_solutions/ctss_app_a.html

    If neither of the above seem to be the issue, then a TAC case may be a good idea, so we can take a look.

    HTH-

    Tina

Maybe you are looking for