Data affinity: Duplication of entities when the value of associatedKey?

I'm trying to implement data affinity. I have a domain of the FootballClub and player model. A player is held by a FootballClub. Players and Clubs are cached in separate NamedCaches and I use serialization of java base.

Affinity seems to work - I connect the partition using a BackingMapListener and you can see that a player is going to the same partition as the club owner. If I start a new data node, and the score moves to the new node, that the player and the Club move together.

The problem I have is that if I change the owner of an existing player and put in my reader updated in the cache of the drive, I don't update the existing player entry in the cache - I get a brand new player. This is the expected behavior?

If it is not planned, anyone have any suggestions as to where I could go wrong? I tried with a KeyAssociator and by setting up KeyAssociation on Player.Id.
I also tried excluding the clubName (associatedKey), in the methods Player.Id.hashcode () and equals() and make the transitional clubName in this class.

I connect MapEvents and you can see that the toString() of the binary version changes key player when the value of KeyAssociator.getAssociatedKey () changes slightly, but convert the key to original format using BackingMapManagerContext.getKeyFromInternalConverter () always returns the same value.

I'm new on consistency so quite possible something basic wrong I.

user6871200 wrote:
I'm trying to implement data affinity. I have a domain of the FootballClub and player model. A player is held by a FootballClub. Players and Clubs are cached in separate NamedCaches and I use serialization of java base.

Affinity seems to work - I connect the partition using a BackingMapListener and you can see that a player is going to the same partition as the club owner. If I start a new data node, and the score moves to the new node, that the player and the Club move together.

The problem I have is that if I change the owner of an existing player and put in my reader updated in the cache of the drive, I don't update the existing player entry in the cache - I get a brand new player. This is the expected behavior?

This is the expected behavior: If you have actually changed the key, it's a different key, and you put the same player with a different key in the cache. Why it would affect old Scripture?

A key in the plan is considered as immutable and you violate this principle.

The problem is that your modeling is defective: owner should not be part of the key, or must be immutable. In your case, it should not be part of the key (but then you can't affinity). Question is: why do you want to have an affinity between the owner and player, anyway?

Best regards

Robert

Tags: Fusion Middleware

Similar Questions

  • How the LED lights up when a threshold is reached, then turns off only when the value does not reach the threshold for a while?

    Hi, I want to write a program that can turn on the LED when a range of value, this is the threshold and only when the value does not reach the threshold for a period of time, say 5 seconds, then the LED will turn off, otherwise it will remain. How can I achieve this in labview? Can someone help me? Really thanks!

    I assume that you use a while loop to keep the updated value.

    Add a record to offset to your looping it initialize with a U32 (time in ms)

    Add the registry to offset to your loop that keeps the previous value of your bool

    When your reaches the threshold value => the light and set the current time in your shift register.

    In the next iteration of the loop weather check value is still above threshold

    => Y-online previous set to true?

    => Y-online the next iteration

    -Online N => turn switch on and set the current time in your shift register.

    -Online N => subtract the time current less time shift record-online more then 5 seconds?

    => Is => keep turning on

    -Online N => turn given

  • Is it possible a 0 is displayed after the decimal point when the value is rounded? (I get: 20-20, 1;) "I need 20, 0-20, 1).

    Using the effect of text "cursor", I am able to view replace "30 ° C" "35.5 ° C". My question is: is it possible a 0 is displayed after the decimal point when the value is rounded? (I get: 20-20, 1;) "I need 20, 0-20, 1). I use this code:

    Temp = effect ("Slider Control") ("Slider");

    sliderValue = Math.round(temp*10)/10;

    [sliderValue + ' ° C ' "']

    Here is the solution:

    numDecimals = 1;

    Temp = effect ("Slider Control") ("Slider");

    sliderValue = (Math.round(temp*10)/10).toFixed(numDecimals);

    sliderValue + "° C";

  • How to disable Lov when the value of the attribute is NULL at the level line

    Hi all

    JDev 11.1.1.5.0

    I have a view as a table ADF jsff page object. Value of the attribute in a row may have null values.
    And I want that Lov must be disabled when the value of the attribute in the row is null or not.
    So please suggest me how can I implement this.

    Kind regards
    Marie-Claude

    Set to the disabled for LOV attribute property

    disabled="#{bindings.YourAttribute.inputValue eq null}
    {code}                                                                                                                                                                                                                                        
    
  • Cell borders disappear when the value is null

    I'm now a PL/SQL report. When the value of a column is null, the cell borders disappear. I would have preferred that they do not disappear.

    Any suggestions?
  • How to hide the div tags when the value inside is empty?

    I'm creating a tab bar using jQueryTabs.

    I want to hide a tab when the value inside is empty.

    It is perfectly feasible to hide the real on the ground when notting to show is, however, the tab is always in the tabs on top.

    Here is the code:

    as you can see in the tabs 4 and 5 I'm hidding values that are inside the field is it not there no. The tab is still there

     <script type="text/javascript">
    // BeginOAWidget_Instance_2140022: #jQueryTabs
    
    
    
    
              $(function() {
          $("#jQueryTabs").tabs({
                        event:"click",
                        collapsible: false,
                        selected:'0',
                        fx: { opacity: 'none', duration: 1 }
            }).tabs( "none" , 1 , false ); 
              });
    
    
    // EndOAWidget_Instance_2140022
           </script>
          <div id="jQueryTabs">
            <ul>
              <li><a href="#tabs-1">Description</a></li>
              <li><a href="#tabs-2">Specification</a></li>
              <li><a href="#tabs-3">Video</a></li>
              <li><a href="#tabs-4">Audio</a></li>
              <li><a href="#tabs-5">Downloads</a></li>
            </ul>
            <div id="tabs-1">
              <p><?php echo $row_Recordset1['Full_Description']; ?>
            </div>
            <div id="tabs-2">
              <p><?php echo $row_Recordset1['Specification']; ?></p>
            </div>
            <div id="tabs-3">
              <p><?php echo $row_Recordset1['Video']; ?></p>
            </div>
            <div id="tabs-4">
              <p><?php if (!is_null($row_Recordset1['Audio1'])) { ?><a href="<?php echo $file_wav.$row_Recordset1['Audio1']; ?>"><img src="files/Images/audio_image1.jpg" width="50" height="50" ></a><?php } ?></p>
            </div>
            <div id="tabs-5">
              <p><?php if (!is_null($row_Recordset1['Brochure'])) { ?>
              <a href="<?php echo $file_pdf.$row_Recordset1['Brochure']; ?>"><img src="files/Images/pdf_image1.jpg"></a>Brochure<?php } ?></p>
              <p><?php if (!is_null($row_Recordset1['User_Guide'])) { ?><a href="<?php echo $file_pdf.$row_Recordset1['User_Guide']; ?>"><img src="files/Images/pdf_image1.jpg"></a>User Guide<?php } ?></p>
            </div>
    
    

    RiaandSteve1 wrote:

    Thanks for your quick response,

    I tried this,

     

    ">

    I'm not able to click on the tab now, but he is always visible (in this case telling audio). I must be something to do with this code

  • Audio
  • above the actual div for the tab.  Do not know how to remove the tab

    Well Yes if you want to hide the tab too then you must surround the

  • tag in a similar way:

  • Audio
  • In the column of table when the values are grater that maximum linear axis it does not show the bar

    Hi guys,.

    In the column of table when the values are grater than there maximum linear axis it does not show the Bar.But I want to display the bar up to the maximum limit of the axis is linear without changing the limit max.

    Consider following the example:

    The values are 80 90 200 300

    and here is the result:

    Left: when I don't put maximum property of linear axis.

    Right: when I put in maximum property of linear axis to 200.

    Untitled.jpg

    Law 4th bar is not visible because the value of this bar is 300 which is excedding maxium. But I want the 4th bar to appear identical to 3 bar.

    How can I do this?

    Thanks in advance.

    Then you should change the value of Y to the maximum value.

    Another option, you should consider is changing the Render item column to reflect that the value is greater than the specified maximum value.

  • Object that can be bound but not updated when the value changes

    I have an object that is declared as [Bindable], which is updated in a component that is also declared as [Bindable] However, when the value is changed the user interface shows the change but the linked object never gets updated.

    Are there cases where related objects do not updated?

    Yes, as I said, pass the name of the property and the value in the change manager.

    Support rating allows you to set the value, not a switch statement. Some examples of code.

    Tracy

  • relaxation led when the value is greater than

    Hey everybody! I have to do a project and im stuck because I'm a noobler with regard to labview. I'm using labview 6 and got to watch the pressure and temperature of a reactor in time. I need to create a system in which if a value is greater than it triggers an alarm (perhaps led can show it) or is less than a certain limit. I mean it should trigger an alarm when the temperature or pressure is beyond 100 and less than 10. And after that to generate a text document in which it is specified the time and date at which these values were exceeded. I also use randomly generated values. Can I get help please? I'm not manage it by myself)

    Line and force. as Norbert said.

    You won't get much sympathy on overloaded around here.  Three things occurred to me that I read your messages:

    1. You will be in trouble when you get a job if you think that you will be not always charged.
    2. If I help you, you'll probably end up working for me and I still have to do your homework.
    3. You'll be fine.  Engineers outsource their work all the time.

  • change should only be updated only when the value of lov

    Hi experts Adf.

    JDeveloper 11.1.1.4.0

    I have a usecase where a lov and a field date is in a table. Each time, I have a lov selects for the first time, and then save the button. Then change date is get inserted with null. (it's fine).

    Now when I change the existing value of the lov and then clicking on save, then the modified date is updated. (it is also very good).

    Scenario question: suppose that in the first row, WE show dropdown because it is saved in the database and change date as null.

    However when I try to change the value to lov ' sales and do not click Save. Now, once I select IT and clicking record. In this case, change date is updated.

    Idle screenplay: Change Date must be updated if there is no modification.

    Untitled.jpg

    If (operation == DML_UPDATE) {}

    setModifyDate (newTimestamp (System.currentMillis));

    }

    You can check the value of publication and skip this step if postedValue is newValue.

    See this example: http://adfcodebits.blogspot.com/2010/07/bit-22-using-getpostedattribute-to.html

    Dario

  • Select the column name when the value = something

    Is there a way to select the column name when there is a specific value in it?

    As follows:

    create table (abc123)

    COLUMN1 VARCHAR2 (50).

    COLUMN2 VARCHAR2 (50).

    Column3 varchar2 (50)

    );

    insert into abc123 values ('yes', 'Yes', 'No');

    insert into abc123 values ('no', 'Yes', 'No');

    INSERT INTO ABC123 VALUES ('no ',' no', 'No');

    insert into abc123 values ('yes', 'Yes', 'Yes');

    SELECT CASE WHEN COLUMN1 = 'Yes' THEN - the name of the column would be here somehow?

    WHEN COLUMN2 = 'Yes' THEN - the name of the column would be here somehow?

    WHERE Column3 = 'Yes' THEN - the name of the column would be here somehow?

    Another null

    finish as abc123 columnname

    final results for the just Column1 would be:

    COLUMN1

    NULL VALUE

    NULL VALUE

    COLUMN1

    I'm not sure what I use to get the name of column in there

    Thank you.

    Hello

    708631 wrote:

    Is there a way to select the column name when there is a specific value in it?

    As follows:

    create table (abc123)

    COLUMN1 VARCHAR2 (50).

    COLUMN2 VARCHAR2 (50).

    Column3 varchar2 (50)

    );

    insert into abc123 values ('yes', 'Yes', 'No');

    insert into abc123 values ('no', 'Yes', 'No');

    INSERT INTO ABC123 VALUES ('no ',' no', 'No');

    insert into abc123 values ('yes', 'Yes', 'Yes');

    SELECT CASE WHEN COLUMN1 = 'Yes' THEN - the name of the column would be here somehow?

    WHEN COLUMN2 = 'Yes' THEN - the name of the column would be here somehow?

    WHERE Column3 = 'Yes' THEN - the name of the column would be here somehow?

    Another null

    finish as abc123 columnname

    final results for the just Column1 would be:

    COLUMN1

    NULL VALUE

    NULL VALUE

    COLUMN1

    I'm not sure what I use to get the name of column in there

    Thank you.

    Thanks for posting the CREATE TABLE and INSERT for the sample data.

    Don't forget to post the exact results you want from these sample data.  If the results depend on the parameters you want to pass a run time, then give a few different examples, with the the desired results of each.

    You can hardcode the values you want, such as the column names in a query.  For example:

    SELECT CASE WHEN column1 = 'Yes' THEN 'Column1' END like y1

    CASE WHEN column2 = 'Yes' THEN 'Column2' END like y2

    CASE WHEN Column3 = 'Yes' THEN 'Column2' END like y3

    , a. *-If wanted

    Of abc123 one

    ;

  • ADF select several shuttles become read only when the value is

    Hello

    I want to ask about the select oracle ADF that many shuttle.

    Recently, I want to create a shuttle a lot with the pre value is set in the right box, select. When I try to set the value of the shuttle to select several properties. The shuttle many select transformed into an object as input like the image below text

    a.png

    but when I'm not set to select several shuttles it became normal like that

    b.png

    the method that I put in the value property is like that

    public list < BidClassification > getListBidClassificationTaken() {}

    finalClassification = new ArrayList();

    The OperationBinding class method = ADFUtil.getMethodBinding ("retrSupSupplierClassificationFindAllBySupplierId");

    method.getParamsMap () .put ("supplierId", getSelectedSupplier () .getId ());

    List < BidClassification > finalClassification = method.execute () (list < BidClassification >).

    Return finalClassification;

    }

    the method that I use to set the position data is like this

    public list < SelectItem > getListBidClassification() {}

    retval = new ArrayList();

    The OperationBinding class method = ADFUtil.getMethodBinding ("retrBidClassificationFindAll");

    listBidClassification = (list < BidClassification >) method.execute ();

    for (BidClassification bc: listBidClassification) {}

    SelectItem item = new SelectItem();

    item.setLabel (bc.getId ());

    item.setValue (bc);

    retval. Add (Item);

    }

    Return retval;

    }

    I have already replace the method equal in the BidClassification class so there will be no more no problem

    Header 1

    < af:selectManyShuttle label = 'Grading' id = 'sms1"binding =" #{backingBeanScope.backing_vendorEdit.sms1} ' "

    leadingHeader = 'Ranking Master' trailingHeader = 'Grading of provider' >

    < f: selectItems value = "#{backingBeanScope.backing_vendorEdit.listBidClassification}" id = "si1" "

    Binding="#{backingBeanScope.backing_vendorEdit.SI1}"/ >

    < / af:selectManyShuttle >

    This the jsff xml where I put the shuttle several select no defined value

    < af:selectManyShuttle label = 'Grading' id = 'sms1"binding =" #{backingBeanScope.backing_vendorEdit.sms1} ' "

    leadingHeader = 'Ranking Master' trailingHeader = 'ranking of provider.

    value = "#{backingBeanScope.backing_vendorEdit.listBidClassificationTaken}" >

    < f: selectItems value = "#{backingBeanScope.backing_vendorEdit.listBidClassification}" id = "si1" "

    Binding="#{backingBeanScope.backing_vendorEdit.SI1}"/ >

    < / af:selectManyShuttle >

    Select this the jsff xml where I put the shuttle well with the value

    someone has an idea of what's going on with this code? ___. thx a lot btw

    @

    Yeay! I already fix it!

    BTW who behave the same as me.

    You must make a note on the setter and the Get accessor of the variable list you use

    * in my case, I don't implement the setter method and the list setter method

    THX.

  • How to set the limit function, means I want defined logic that when the value is between 0 to 0.3 loop and then stops.

    Hello

    I'm looking for the logic as the way to define the logic of upper limit and lower limit.

    Means that there is only one indicator of entry in which a user can enter any value, I want that when the user gives value between 0 and 0.3 for example while then loop will stop other wise, it will work on an ongoing basis.

    Please guide me.

    Thank you very much.

    Please consider the VI below.

  • When the value to display in the time format double digital indicator... Changes in value.

    Hi all

    I can't display the values that I want. I have a value double say 320 sent to a digital indicator where I edited the properties of it to display in a time format that contains only minutes and seconds as Yes, 3:20 '. Unfortunately, it takes the value and change it to another value and display that. I don't know what is the issue. If anyone knows the solution... Please post!

    There is an image attatched!

    Thank you.

    I believe only then due to the fact that when I convert a timestamp value to double as 03:20, he gave me 320. So I thought that the reverse can be trying. Should I just enter the total amount of seconds and that will show the Minuteseconds I want?

    Thanks for the quick response.

  • Resolution of the screen - police too small when the value of resolution 1920 x 1080

    original title: screen resolution

    Got a new laptop which has 1920 x 1080 screen resolution that I paid extra for.  However, when I keep this setting on any web site text size/font is so small that it is very difficult to read.  I tried all the plugins to font size, but that did not help.  The only way I can get readable (for me) the text is to reduce the 1360 x 768 resolution which totally defeats the purpose of getting a screen high resolution.  Is there another way other than the setting screen resolution, such that it can be Pascal outside and still provide a readable text?  I don't want bugs like the magnifying glass or similar devices.

    When you increase the resolution of the screen, things are smaller. Basically, the only way to get great results even at higher resolutions is to have a bigger screen. Magnifying glass, zooms and more police sizes allow you just to settle on the edges of this kit, you must make the best compromise.

    I use 1920 x 1080 and I have my text size the value 125% (and IE9 = 200% zoom), but I have a 24 "display which is much bigger than a computer screen.

Maybe you are looking for

  • Song lost on iTunes

    I lost a piece of my iTunes on my Mac, but it's on the iPod. Can I restore it to my Mac without reload the CD. If I sync, I think I will lose it. Can anyone help please?

  • NB305-10F vs-10 K difference and how to change my OS?

    Hi all! I want to buy portable NB305, but I can't choose between the models NB305-10F and NB305 - 10K. The difference between them is ddr2 800 RAM in French - 10F and ddr3 1066 RAM-10T, but - 10F costs about $ 100 higher then - 10 K in my country. So

  • Card PCI Express causes conflict w/ethernet card

    When I install the card PCI/MXI express, it causes a conflict with my existing ethernt card and will not allow the CPU to register on the network.  When I remove the PCI card, the problem goes away.  Is there something I need to set up to prevent thi

  • Microsoft visual CC ++ Runtime 9. Service Pack 1

    Received message that microsoft visual CC ++ Runtime 9. Service Pack 1 could not be installed and to use windows update to install manually. How can I do this? See you soon Kevin

  • Zire hot sync

    Hello I'm having a hot-sync problem from my computer palm zire with my new computer Inspiron 1546, 64-bit, with a home premium to windows 7. Running hot Sync Manager I have the icon on the bottom bar of the right tool in the system tray is a USB and