How to create a comparator custom for POFExtractor request function

I have the following code after the migration from 3.4 to 3.5 and entrySet returns nothing now. "I think it's because of the CustomerMessageComparator());

Filter newMsgfilter = new GreaterFilter (new PofExtractor (EncoreMessage.MESSAGEID_INDEX), (long) index);
Set < < String, EncoreMessage > Map.Entry > = customerMsgCache.entrySet (new AndFilter (new EqualsFilter (new PofExtractor (EncoreMessage.ENCOREID_INDEX), this.encoreID), newMsgfilter), CustomerMessageComparator()) new;

Comparator (3.4) custom is implemneted by following the path

/ public class CustomerMessageComparator implements comparator {}

public int compare (Object msgInfo1, Object msgInfo2) {}

long msgId1 = (msgInfo1) .getMessageId ((EncoreMessage));

long msgId2 = (msgInfo2) .getMessageId ((EncoreMessage));

If (msgId1 > msgId2)

Return 1;

ElseIf (msgId1 < msgId2)

Returns - 1;

on the other

return 0;

}

}

My question is, how to achieve the same result in 3.5? Do I need to implement the comparer, if yes what will then object type in the signature to compare?

Hi user1228154,

It looks like a limitation in the PofExtractor, when the long values are in - 1.22 range. To work around the problem, you can create a subclass of the PofExtractor like this:

import com.tangosol.util.extractor.PofExtractor;
import com.tangosol.util.BinaryEntry;
import com.tangosol.io.pof.reflect.PofNavigator;

import java.util.Map;

/**
 * dimitri Aug 19, 2009 10:30:08 PM
 */
public class LongPofExtractor extends PofExtractor
    {
    public LongPofExtractor()
        {
        super();
        }

    public LongPofExtractor(int iProp)
        {
        super(iProp);
        }

    public LongPofExtractor(PofNavigator navigator)
        {
        super(navigator);
        }

    public LongPofExtractor(PofNavigator navigator, int nTarget)
        {
        super(navigator, nTarget);
        }

    public Object extractFromEntry(Map.Entry entry)
        {
        Object oExtracted =  super.extractFromEntry(entry);
        if (oExtracted instanceof Integer)
            {
            oExtracted = new Long((Integer)oExtracted);
            }
        else if (oExtracted == null)
            {
            oExtracted = makeLong(0);
            }
        return oExtracted;
        }

    public boolean equals(Object o)
        {
        return o instanceof LongPofExtractor && super.equals(o);
        }

    public int hashCode()
        {
        return super.hashCode();
        }
    }

Kind regards
Dimitri

Published by: drakitine on August 20, 2009 08:55

Tags: Fusion Middleware

Similar Questions

  • How to create your default desktop for all / some users?

    Using Vista business I want to create a desktop computer by default for all users. How can I do this?

    I have a machine that has a dozen accounts. Can I retroactively apply this desktop computer to some existing accounts?

    Thanks for thehlp

    Joe

    Discussions on the topic "Change the profile by default in Vista"
    http://social.technet.Microsoft.com/forums/en-us/itprovistasetup/thread/62ed66ad-71cd-43C3-83c0-5303d77176b8/
    by Heather

    "How to make a standard profile w / user by default.
    http://forums.techarena.in/Vista-Help/1065679.htm
    by Darrell Gorter [MSFT]

    How to create the default profile for Vista
    http://help.Lockergnome.com/Vista/create-Vista-default-profile--ftopict15825.html
    Darell Gorter mentioned here only taken methods supported to change the default user profile:
    "How to customize the local default user profile when you prepare a
    image of Windows Vista, Windows Server 2008, Windows XP, or Windows Server 2003"
    http://support.Microsoft.com/default.aspx?scid=KB; EN-US; 959753
    but when you go on the link says the Tip system is not for Vista, on Windows Vista title is missing.

    I hope I could help

  • How to create the file .bar for production mode?

    Hello

    How to create a file .bar for production mode?

    When Flash Builder, I configure my project for the mode of Production, he asks me a RIM certificate that must be registered (and then need a CSI file?). Where can I find this file?

    Thank you

    Signature of application information has not yet been published.  You can submit your application unsigned.  In addition, in FB4, in the Properties window of the project, under the Flex compiler, you can add

    -debug = false

    to compile without debugging information.

    Otherwise, .bar file creation is done in a regular compilation with BB CLI package.

  • How to create the firewall rule for Windows 7 for javaw.exe?

    How to create the firewall rule for Windows 7 for javaw.exe? The application path differs from the new versions and user profiles. Is there generic symbols allowed for example asterisk?

    Hello

    I recommend you to send the request to another Department for assistance:

    Security in Windows 7

    http://social.technet.Microsoft.com/forums/en/w7itprosecurity/threads

    I hope this helps.

  • How to create my electronic signature for the first time

    How to create my electronic signature for the first time

    Hi debbieh62171891,

    You can fill feature & signature to create a Signature in Adobe Reader. If you want to create a Digital Signature using Adobe Reader you must then a PDF form with signature inside and drive field expanded licence fees. In this case, when you click the signature field it will take you with the process of creating a Digital Signature.

    Thank you

    Abhishek

  • How to create a file .eas for sprite sheets?

    Hello

    Does anyone know how to create a file .eas for sprite sheets.

    It looks like a data xml file that would normally correspond with a sprite sheet. I usually use automated sprite sheet software to create the xml data form. I don't see the option for .eas export file in the software of the packer of texture that I use.

    It would be convenient that Photoshop has the ability to export an eas... perhaps with a plugin.

    Thanks for your help.

    EAS file format is also a JSON format, but is specific on board animate. Currently, this spritesheet format can be generated from Flash Pro CC 2014.

    Spritesheets (image file with sprite of equal size stacked in the order) of other tools like packer of texture can also be imported in animate as the dialog box animate import Spritesheet support it. Production however you specify the rows/columns and parameters in the import of fill dialog box so that the sprites are created with precision.

    Plese do try it and let us know if it works for you.

    -Reynaud

  • Adobe Stock: How to create a sub account for a customer?

    Hello

    I have the following problem: I found a beautiful picture on Adobe Stock what my client wants to use for graphics work I've created for him (commercial use).

    I am a graphic designer and I have the account - my client must create their own account and download the image itself?

    Or can I create a sub account for him and legally use the image for the work? If so, HOW?
    I don't find really no useful response to this question... I hope so, you can help me!

    Thank you very much and I hope to hear from you!

    Ute

    Hey Ute

    You can picture the license and use it to create work for your client.

    Please check the terms of the license for more information on the use of the customer:

    Royalty-free images, pictures and graphics. Adobe Stock

    http://www.Adobe.com/content/dam/ACOM/en/legal/servicetou/Adobe_Stock_Terms-en_US_20160616 .pdf

    Thank you

    Bev

  • How to create your own alarm for agents of the oracle

    Hello

    I have about 100 agents to oracle

    I have been asked to keep an eye on the UNDO tablespace

    I used the rule of tablespaces that does the job but has a warning and a value critical low

    I can't change these values

    Then I look at creating the same rule as for storage space, but only to the UNDO tablespace where I could put different values for warnings and criticisms

    Thank you for your help

    Concerning

    Courteous Philippe

    Radio-Canada/Radio-Canada company

    SR. DBA / admin Foglight.

    Hello

    what I suggest, is to copy the existing rule DBO - used Tablespace percentage, give it a name to identify it is a custom rule and change the scope of the rule so that it applies only to the UNDO tablespace:

    Scope:

    DBO_Tablespace where the content = "UNDO."

    Because there is a custom rule that he will not be in the dashboard global admin. So I would create new registry custom variables to contain your thresholds based on the following:

    DBO_TablespaceStorage-AllocatedUsedPct_Low

    DBO_TablespaceStorage-AllocatedUsedPct_Medium

    Then, modify the conditions of the rule to use these variables.

    for example, putting warning

    From:

    condition = (#DBO_allocated_space_used_pct_for_rules # > = registry("DBO_TablespaceStorage-AllocatedUsedPct_Low"));

    Return DBWC_RacAndSingleInstanceRuleFilter (scope, "BOD - Tablespace used percentage", "2", status);

    TO:

    #DBO_allocated_space_used_pct_for_rules # > = registry("DBO_TablespaceUNDOStorage-AllocatedUsedPct_Low")

    Also update the message to your needs.

  • How to create a partition only for my operating system another to play with me?

    My relay problem that I had towing partition C: and D: drive, but I had to remove my D: drive because my C: drive was full, and now I want to create and partition only for my O.S. and only this, so that any other program can be installed in my D: drive.

    Someone could answer my question A.S.A.P. Please, I want to know if I can do it or not, and if I can how to do it.

    Before trying to partition, which is shown in management disks for disk 0? (the name of the partitions & sizes)

    This PC came with win7 preinstalled, and if yes do you have does the recovery discs?

    Note If you attempt to partition, without first giving that info, you can trash your system and lose everything on the disc

  • How to create DVDs of backup for windows 8.1

    Hi I have windows 8 on my laptop that has been upgraded to windows 8.1, later. Now, I want to prepare the backup my windows bootable dvd, so please tell me how to proceed?

    Create an installation media for Windows 8.1

  • How to create website using Photoshop for blogger

    I registered a domain http://www.exam-results-gov.in/ name. I want to design the Web site template for this area. I want to use blogspot for host this Web site. It simply means that I want to design custom for my newly registered domain blogger. I searched the internet but could not "find. If one does the right tutorial how to do it. I will be thankful to you. Waiting for your positive response.

    Kind regards

    Sudhir

    Hello

    Have you read the help Blogger or forum?

    Blogger Help Center

    Stone

  • How to create a clean button for captioning

    Hello

    I created my own buttons for play, stop, etc the output. But I don't know how to create a button to display closed captioning.  I tried a few hours but I give up. What should I do? :

    First clik - captioning will appear.

    Second clik - captioning will disappear.

    And so on appear/disappear/appear/disappear

    Help please!

    Poul

    Take a look on: buttons in the form of rocking - Captivate 6 - Captivate blog

    Replace the variable cpCmndMute of cpCmndCC system and you will have the choice between different scenarios.

  • How to create my own PDF for others to fill in and sign? I bought the deluxe membership and I can't understand it.

    Please let me know how to create a fill and a sign. I just bought the subscription and the only thing it allows me to do is to download a file to fill in and sign, or convert to pdf format. I need to create my own complete and sign for my teaching and administrative staff.

    What exactly did subscribe you?

    Adobe PDF package can convert documents to PDF.

    Adobe FormsCentral can create forms to fill in zero or models.

    Adobe Acrobat can do both and more.

  • How to create a hot spot for a full browser image?

    I have a background image created in Photoshop in the browser padding, scale to fill.

    This is my landing page and would like to create an 'invisible' reactive or rectangle area to post a link to another page in my site when clicked.

    I did this and work, however, my problem is that when my browser size is expanded or reduced, the place where I want the area reactive to be changes in the size and location.

    I want to create a hotspot that will keep its form around my logo no matter the size of the screen.

    I tried this with a no bottom box and white outline to see how he responds to each fill property but may not know how to create a box to be in a fixed position that will always upward

    with the browser fill image location and size.

    Thanks for your help.

    Hello

    Have you tried to pin the box on the page so that it should be in a fixed position?

    Also if you want the box to be on a specific job with scrolling the page, then you can try using the scrolling of the effects that would scroll the page box but inside the defined positions.

    Thank you

    Sanjit

  • How to create a service listening for 10g in Win2k?

    Hello

    I accidentally deleted the service listening for 10g in our win2k server using the wizard netconfig.
    I want to create a new, but I can't do the net assistant is just hangging forever.

    I can still start the listener to prompt back and set it up manually using the manual editing of LISTENER.ora

    How to create a service back order please. Or do I need to create a?


    Thank you very much

    Edited by: KinsaKaUy? on June 30, 2011 23:07

    KinsaKaUy? wrote:
    Hello

    I accidentally deleted the service listening for 10g in our win2k server using the wizard netconfig.
    I want to create a new, but I can't do the net assistant is just hangging forever.

    I can still start the listener to prompt back and set it up manually using the manual editing of LISTENER.ora

    How to create a service back order please. Or do I need to create a?

    Thank you very much

    Edited by: KinsaKaUy? on June 30, 2011 23:07

    If you create a listener using NETCA, service will be created.

Maybe you are looking for