Why use key-partitioning and key-associator features?

Why use key-partitioning and key-associator features?
What kind of applications are suitable for using key-associator and key-partitioning features?
Could you give me some example?
Thank you

So the typical way is to use KeyAssociation. This is a single interface that uses a method
public Object getAssociatedKey();
I believe this works on the ClusterService level (rather than say the Cache). So, say you have a Client and an Account cache where a Client can have multiple Accounts. Now both the Client and the Account object will implement KeyAssociation and return the client object as the AssociatedKey. This will cause these associated objects to live on the same partition.
Now you can do some clever tricks since you know these are on the same partition. These include using the BackingMap and EntryProcessors / InvocationService / Aggregators to return all the AccountIds associated with a client account (essentially a join).
Unfortunately, these are pretty advanced Coherence features so it is worth building them in a testcase first and getting them to work before you integrate them into your application.
Best, Andrew.
PS. You could also use the KeyPartitioningStrategy, but I prefer the KeyAssociation (as do most people).

Similar Messages

  • Navigate previous record,next record by entering key-up and key-down

    Hi ,
    JDeveloper11g_
    I am trying to solve of how to navigate previous record,next record by entering key-up and key-down in ADF Table.
    If any of you have this solution by JScript of Backing Bean please help me.
    Thanks
    zakir
    ===

    Hi zakir,
    I hope I understood your requirements correctly. You have an editable ADF table. You would like to use the up/down arrow keys to move from one row to the next/prev row of the same column. Since the Tab key moves the cursor to the right and Shift+Tab moves it to the left, now you want to implement the same thing but just up and down, correct? If so, try this.
    /** Javascript **/
    function detectKey(evt) {
        var inputText = evt.getSource();
        var id = inputText.getClientId();
        var start2 = id.indexOf(":") + 1;
        var end2 = id.lastIndexOf(":");
        var numValue = parseInt(id.substring(start2, end2));
        var evt2 = evt.getNativeEvent();
        arrows=((evt2.which)||(evt2.keyCode));
        switch(arrows) {
            // Up arrow
            case 38:
            numValue = numValue - 1;
            break;
            // Down arrow
            case 40:
            numValue = numValue + 1;
            break;
        var newStr = id.replace(/:\d:/, ':' + numValue + ':');
        var comp = AdfPage.PAGE.findComponent(newStr);
        if (comp != undefined) {
            comp.focus();
    /** Jspx. (Place a client listener on each inputText in the ADF table) **/
    <af:column .....>
      <af:inputText value="#{row.bindings.price.inputValue}" .....>
        <af:clientListener type="keyDown" method="detectKey"/>
      </af:inputText>
    </af:column>With this, you get to move Up/Right/Down/Left in the editable ADF table without using the mouse.
    References:
    http://thepeninsulasedge.com/blog/?cat=29
    af:clientListener attributes and methodes of event object in java script
    Regards,
    Chan Kelwin

  • Java Applet key down and key up events

    I've written a program that extends applet but I can't get the event handling to work for keys.
    I've copied the below code into my applet but at the moment not even my system.out's are printed.
    How can I get this to work?
    // Handle key down and key up events
    public boolean keyDown(Event e, int key) {
    int flags = e.modifiers;
    System.out.println("Key " + e.id); //ns test
    if (e.id == Event.KEY_PRESS)      // a regular key
    showLine("Key Down: " + mods(flags) + key_name(e));
    else if (e.id == Event.KEY_ACTION) // a function key
         showLine("Function Key Down: " mods(flags)
              function_key_name(key));
    return true;
    public boolean keyUp(Event e, int key) {
    int flags = e.modifiers;
    if (e.id == Event.KEY_RELEASE)      // a regular key
    showLine("Key Release: " + mods(flags) + key_name(e));
    else if (e.id == Event.KEY_ACTION_RELEASE) // a function key
         showLine("Function Key action release: " mods(flags)
              function_key_name(key));
    return true;
    Thanks and sincere regards if you managed to read this far.

    I have found a solution!
    Your program, after it extends applet, you must also implement KeyListener, add the associated methods with KeyListener, and you must add the KeyListener in the init.
    code should look something like this:
    class program extends Applet implements KeyListener {
    public void init() {
    addKeyListener(this);
    public void keyTyped(KeyEvent key) {}
    public void keyPressed(KeyEvent key) {}
    public void keyReleased(KeyEvent key) {
    if (key.getKeyCode() == KeyEvent.VK_DOWN) {
    // Do something when user hits down-cursor.
    } else if (key.getKeyCode() == KeyEvent.VK_UP) {
    // Do something when user hits up-cursor.
    }

  • Why use layer masks and adjustment layers?

    I've been using PSE and CS successfully for years.
    One thing I have never understood is: why use layer masks and adjustment layers, instead of simply creating a copy of the subject layer (the one I want to make changes to) and experimenting with that?  It's quick (Ctrl-J), I can do it as many times as I want, I'm not affecting my Background layer.  If I like the changes, I can keep them.  I can switch the copy on and off to compare with the Background layer.  I can do any type of blend or combination I desire.  I can insert Gradient layer(s), select any part of the copy and (Ctrl-J) create a new layer containing only the selected part.  I can adjust size, rotate, do anything.
    It almost seems that "layer mask" and "adjustment layer" are mainly another layer of terminology; can anyone explain (preferably in 50 words or less) how they are intrinsically different from or superior to working with copies of the Background layer?  What can be done with them that can't be done simply using copies of the Background layer?

    Here's a very basic example of the advantage of using a layer mask.
    I have this picture of a sunflower and I want to convert the background to black & white, leaving just the flower in color.  I duplicated the Background layer, converted it to B&W and proceeded to use the Eraser to uncover the flower color. But I made a mistake and erased outside the flower.  There is no way to correct this other than deleting the layer and starting again.
    Now let's use a layer mask on the B&W layer. Set the Foreground/Background colors to the defaults black/white. Using the Brush tool paint on the mask with black to reveal the color.  Here I painted too far, revealing a green leaf in the background.  No need to start over.  Simply switch to white and paint the excess to convert back to the B&W.
    Tip: while painting you can type "X" to toggle between black and white.
    You could also select the flower using the various selection tools and then fill the selection with black. If it turns out the selection was not 100% accurate you can then fine-tune the result by painting on the mask with black or white as necessary.

  • Use of PLSExtProc and key EXTPROC in Oracle 10g

    Hi Friends,
    My listener file has the following values:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oracleinfra)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xyz.local)(PORT = 1521))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    My question is ?
    What is the use of the Instance PLSExtProc and key EXTPROC?
    Is it must to have the entry ,shall i remove the entry? what will be the implications if i remove the entries?Please suggest
    Regards,
    DB

    Its used for external procedure calls like from Java and C. Its not a must and from the secuirty point of view, its actually a loophole. For more information, please read,
    http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/advcfg.htm#i443234
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17125/adfns_externproc.htm#ADFNS010
    HTH
    Aman....

  • Track key press and key release on WPF applications

    Is there a way to track key press and release actions on WPF?
    This is what I've tried so far, but what I'm finding is that the _upDownKeyIsPressed is
    only set to false if I press another key - not when the up or down key is released.
    private void TrackUpDownKeyPress(KeyEventArgs e)
    if (e.Key == Key.Up || e.Key == Key.Down)
    // set to true if either up or down key is pressed
    _upDownKeyIsPressed = true;
    else
    // set to false once up or down key is released
    _upDownKeyIsPressed = false;
    private void PlotListView_KeyUp(object sender, KeyEventArgs e)
    TrackUpDownKeyPress(e);

    You want to track the Up and Down events. If you only use the Up event, then the variable will only be set to false when
    another key triggers the Up event:
    private void PlotListView_KeyUp(object sender, KeyEventArgs e)
    if (e.Key == Key.Up || e.Key == Key.Down)
    // set to true if either up or down key is pressed
    _upDownKeyIsPressed = true;
    private void PlotListView_KeyDown(object sender, KeyEventArgs e)
    if (e.Key == Key.Up || e.Key == Key.Down)
    // set to false if either up or down key is depressed
    _upDownKeyIsPressed = false;

  • Why use app server and EJB?

    we have a project about Component-based Library for Business Information Systems.
    We have chosen Point-Of-Sales System as the type of our system.
    why do we need to use app server and EJB?
    Hope can have replies soon. Thanks so much!
    regards
    beginning of EJB

    Well, you don't need to. You might want to because transaction management is important for point-of-sales and app server/EJB gives you that for 'almost nothing'.

  • Selection Key Figures and Key Figures

    I am building a query and I need to combine Key Figures and Selected Key Figures so that they appear on the same row.  However, when I try to do this I get a message that you cannot put the elements in the same structure.  However, if I put in different structures they will not be aligned.  How can I overcome? Thanks

    if i undertd your issue correctly..u have one KF struxture and one characteristic structure.In characteristic structure,u r having restricted characteristics and u r tyring to have a KF in char structure???if so,it is not possible..where exactly u r getting error?it will not allow you to drag and drop Kefigure into Query deisgner except into KF structure..
    in char structure,if u r gng with new selection,u will not have option to select any KFs.
    it could be better if u provide an example rather than explaining theoritically.
    please note that u cant have a KF in characteristic structure .u can have a char in KF strcucture with a KF combination i.e. Restricted KF.
    Message was edited by: Murali

  • Why no option click and other missing features?

    The biggest thing I miss from Eudora is being able to <option> click on any field in any mailbox and have all emails with an identical field grouped together. For example, I get daily emails from slate.com. When I get behind and wish to dump them all, I can no longer just <option> click on any one of them to select them all.
    The other thing I miss is drag and drop editing. I used to be able to select a sentence, for example, click and hold, then drag it to where I would prefer it to be. This worked for any selection, and understood periods and spacing. I wish Mail had it.

    When I get behind and wish to dump them all, I can no longer just <option> click on any one of them to select them all.
    I do that all the time myself, but in Mail it's done differently. If the emails have the same FROM address, select one of them and click the header for the From column. All the email with that same address are group together. I just select them all (click first one - SHIFT key - click last one) and drag to trash.
    The other thing I miss is drag and drop editing.
    It works for me in Mail.

  • I have an external hard drive that is partitioned three ways. I have made an install disk out of one partition. How can I use this partition, and not the whole drive with bootcamp assistant?

    See title.
    When the drive is plugged in, boot camp assistant says that no installer can be found, but the application doesn't list the three separate partitions like finder/disk util does.
    I am using a mid-'12 retina mac running os X 10.9
    Hopefully this is an easy fix.
    Thanks in advance.

    Hello,
    I have just experienced the same thing!
    Although my external drive shows in Disk Utility, it does not show in Finder.
    And the Verify/Repair buttons are also greyed out.
    Also, although the drive is 2TB. DU shows it as having Total Capacity of only 4.14GB! (Which should be the Free Space).
    I was wondering if you solved your problem, & if so, would you share your solution.
    I´m afraid to Erase in case I lose all my Data on the drive.
    Thanks in advance for your reply!

  • Why use ATI 4270 and not on die 6530D?

    HP Touchsmart 520Z, AMD A6-3600, 6GB memory, 1.0TB HDD
    Hi everyone,
    Why do the 520Z models use the inferior ATI HD 4270 and not the much more powerful 6530D that is on the A6-3600 die?  Are they working in synergy, like crossfire?
    Every single benchmark I've come across reveals that the 6530D is vastly superior to the 4270, what gives? 

    SalemSwift, welcome to the forum.
    I am not a HP employee, so this is strictly my opinion.  There are many different price points in the TouchSmart line.  So that they can offer these different prices, they have to pick their components carefully.  They want the computers to give the best performance possible with the combined components.  High-end video cards require more power to function properly.  The price must increase accordingly.
    Please click "Accept as Solution" if your problem is solved.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • Key up and key down operation marks gray colour in the list block.

    Can any one give the solution for this which I am trying to remove in oracle forms 6i which marks gray color when traveresed in list block.I think you have got my problem that if list contains 10 items in list block and if u traverse in this list form first 1 to 4items it marks gray color for all four items rather then for item on which it is i.e only the 4th item should grey color as the cursor is present.All techies please give the solution as earlier as possible.

    Sorry, but i don't understand your problem. Could you explain a little more detailed what you want to achieve?

  • Data fields and key fields

    Hi,
    Data fields and key fields are same as Characteristcs and key figures? Or they are diffrerent?
    Thanks,
    Radha

    HI
    Key Fields =  Acts as Primary Key for The ODS like Primary of Tables in R3.
    Data fields =  Apart from Key fields We consider rest as data fields.
    Ususally we use Characteristic info Objects and Dates in Key Fields and Key figures in Data fields.
    It's decisive factor for overwriting property of ODS or DOS.
    Hope this helps.
    Regards,
    Rangzz
    Edited by: Ranganath Kodiugane on Feb 7, 2009 12:14 PM

  • Key-up and down triggers not firing

    I have a multi-record block and want to go to the previous and next records in it when the user presses the up and down arrow keys. I thought this was default behavior, but the keys didn't do anything so I tried putting key-up and key-down triggers on the block. They don't fire at all when I press the up and down arrow keys. The debug messages confirm that nothing happens at all when these keys are pressed. I tried putting form-level triggers on, and they don't fire from that block either, although they do fire from another single-record block.
    I'm thinking maybe it is just some block property that I have not set correctly, but I can't see anything obvious when looking through the properties. I have the Navigation Style set to Change Record, but have tried the other options and nothing changed. The records do cycle through using the <Tab> key.
    Any help is appreciated.
    Thanks,
    Ben
    null

    I'm not running web. I went ahead and tried setting num lock off anyway, but it didn't make any difference. Thanks for the suggestion.
    Ben
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by vijay kumar ([email protected]):
    Are u running ur application in web?
    Try the numeric arrow keys (set num lock off)
    <HR></BLOCKQUOTE>
    null

  • Why use RMAN CATALOG ?

    Hi,
    Anybody tell me why use RMAN CATALOG and what benifits if i have create catalog ?

    No we have to configure it. I see. But did this user understand that when you quoted my reply ? We need to understand that a lot of users who post here need help and may not have the level of knowlege you have. So, a response like that adds more problems to the one they already have.
    So even if you are using nocatalog, if it is not configured to auto backup and it is not backed up, you can still loose your RMAN repository.

Maybe you are looking for

  • Why does OS X Mavericks keeps the iWork 0'9 and iMovie 9.0.9

    I have just udated Mavericks and I saw in my applications tab on finder that iWork 0'9 and iMovie 9.0.9 still there, and I just don't know why. Normally the old software is deleted. Isn't it?

  • ERROR occured at Interface Determination

    Hi all,      Ths is  satya our senario is RFC to FILE but the problem is sender RFC is already configuerd to another interface.How can i assign that sender RFC to my interface.Hear i am using Sender service instead of sender system for testing purpos

  • DB2E Storage Limit

    Hi All, I have a basic question about DB2E Storage Limit. I am implementing MAM 3.0 on desktop/laptops. So how much data I can store in Db2e? Is there a limit? Does more that means performance issues? Or does the data storage depends on the hard disk

  • Problems installing Python for S60 v2.0

    When I try to install Python for S60 v2.0 (from the program update on the phone) I get this error: 1 update could not be installed. Close some programs and try again. But I don't have any other open programs! I have Nokia N78 Message Edited by Mikael

  • [dwm-6.0] systray looking weird

    After some time I spent figuring how patches work, I finally managed to compile dwm from source. Only patches I have applied are systray and status colors. Nothing more. But I had to change sel and norm to color[0], because they are declared as color