You can create an index on a map?

I have a few questions that I can't understand, or find a viable for example. You can create an index for a card, contained in a nested object, and if so, how would you do that? I have currently a filter inspected this criterion in the cache, but I am unable to understand to create an index of usabe for the custom filter. I use coherence 3.5.2 - any help would be most appreciated. I don't know if / what should I do with the SimpleMapIndex...

Here's the Basic object below map. My filter retrieves all objects of ClientType with a client in his collection that contains the past in integer value in the customer's card. So can you create an Index on a card (and a nested to it) and how do you this? The index should be on the nested customerValues hashmap.
class CustomerGroup
{
    Set<Customer> customers ;
}

class Customer
{
    Map<Integer, CustumerValue> customerValues;
}

If you write a custom, ValueExtractor you need to create an index, then you will not have a custom filter.

Depending on how effective it must be custom Extractor you can use POF and don't have to deserialize the entries to create the index, or it can deserialize the class, which will make the code simpler.

For example, without the use of POF

public class MapKeyExtractor extends EntryExtractor implements PortableObject {

    public MapKeyExtractor() {
    }

    @Override
    public Object extractFromEntry(Map.Entry entry) {
        Set keys = new HashSet();
        CustomerGroup group = (CustomerGroup) entry.getValue();
        Set customers = group.getCustomers();
        for (Customer customer : customers) {
            keys.addAll(customer.getCustomerValues().keySet());
        }
        return keys;
    }

    @Override
    public boolean equals(Object obj) {
        return (obj instanceof MapKeyExtractor);
    }

    @Override
    public int hashCode() {
        return MapKeyExtractor.class.hashCode();
    }

    @Override
    public void readExternal(PofReader in) throws IOException {
        super.readExternal(in);
    }

    @Override
    public void writeExternal(PofWriter out) throws IOException {
        super.writeExternal(out);
    }
}

The extractor above returns a collection of all the integer values in the keys to all the customerValues of all customers in a ClientType (I guessed you have some accessor methods on classes that you posted).

You can then use a ContainsFilter for your query. For example to get all values in the cache where the customerValues card contains a 19-key...

Set results = cache.entrySet(new ContainsFilter(new MapKeyExtractor(), 19));

You could write a version of the MapKeyExtractor which uses POF and wouldn't not deserialize values, but it's more complicated code, because should extract the POF of value stream map and go down the keys and values extract the key. It's doable, but not worth it unless you're really worried about the execution of updates of the index.

Discalimer I wrote the code over the top of my head so have not compiled or tested, but it should be OK.

JK

Tags: Fusion Middleware

Similar Questions

  • How to add a new document type to those that you can create by right-clicking on the desktop window or fodler?

    When you right-click on the desktop or the window displaying the contents of a folder and select 'New', you see a list of the types of documents you can create. How to add and delete?

    When you right-click on the desktop or the window displaying the contents of a folder and select 'New', you see a list of the types of documents you can create. How to add and delete?

    With regedit , you can see a lot of extensions of files known, for example, HKEY_CLASSES_ROOT\.txt for txtfile.   To get rid of the "new extension" option in all of the folders that you can rename the key HKCR\.txt\ShellNew to HKCR\.txt\ShellNew.disabled or similar.

    Some applications can open empty files, for example, Notepad can open a (new) empty text file.  For the purposes of C:\windows\shellnew which is indicated by an empty string (REGSZ) NullFile.
     
  • trial version you can create subtitles?

    on the trial version you can create subtitles?

    Hi Julian,

    Yes, you can create subtitles in Premiere Pro (trial).

    Learn how to work with captions in Premiere Pro

    Thank you

    Ilyes Singh

  • You can create an online version for pc?

    You can create an online version for pc?

    With a Pro account or company DPS, you can activate the Social sharing feature and display DPS items in the web viewer on a PC. More info here:

    http://helpx.Adobe.com/Digital-Publishing-Suite/help/using-social-sharing.html

  • You can create an application iPad w / two H &amp; V layouts without creating copies of everything?

    You can create an application iPad w / two H & V layouts without creating copies of everything?

    You must make separate models for H and V.

    Neil

  • You can create a table of contents with page numbers using bookmarks?

    You can create a table of contents with page numbers using bookmarks?

    Sometimes a long article has bookmarks to help navigate, it but has no real TOC (table of contents) on the first page. In such a situation, I think that it would facilitate the reading of the paper version if you can somehow create a table of contents with page based on hierarchical bookmarks in the document numbers.

    If this is not possible from Acrobat, is there a third party app?

    Indeed you have created a script for this - sorry that I missed it. I should have...

    Acrobat - Create TOC bookmarks

  • Adobe Bridge - you can create custom meta tags

    Hi, this question is on Adobe Bridge. You can create your own meta tags? I want one called "Caption" not "Description." It is therefore through, he shoots the resource space where our org share photos.

    Thank you

    Jac

    You can create your own meta tags? I want one called "Caption" not "Description."

    It is not possible because Photoshop and Bridge use the same file information that are based on the world standard IPTC and they use description for this field.

    However, in practice, many applications DAM respect despite their name or can be configured to read the info in the description and place it in the appropriate field (some call it legend, other notes etc.) for your DAM-based application company.

    Hope this will help you a little.

  • You can create a datamerge at the editing table?

    Using InDesign CS5 is anyway that you can create a datamerge at the editing table?

    I want to place the file number in the section of purge for the series of newspaper advertisements. When I try to create a merged document, I am informed that there are no placeholders are present even if I added in the mount table.

    Someone at - it solutions?

    When you configure the placeholder, set the text to get to the bottom of the text box and stretch the text box so that it touches the print area of the page.

  • If you delete the free partner site, you can create a new one from scratch?

    Hi all

    So I just saw that a free partner site has been created for me and she seem to include all the features of BC on it (which is great!), the problem is it seems to have a default value of site of BC he likes when you publish your site regardless of the host, and they put their index by default on this subject until you load you own site. Then I tried to chat with a customer representative on this live chat option and he said I could not change the default template that comes to this subject. SO, what is the point to get this free site, if you cannot customize to your taste? THEN I thought, maybe if I delete the site it will give the possibility to create a new free site parter, but this time I'll be that choose the model and other configs. However, I'm afraid that if I delete the site, that's all, I won't be able to create a new partner free site and it and all of its features will be gone forever, that why I post here. Everyone how you can change an existing model does not place, or if you delete the free partner site that is given to you, you are able to create a new?

    Thank you

    Alex.

    Currently, there is not any way to assign a model on the partner site (for example, a model of BC) or one of the sites that sale models BC.

    The best method is to create a test site with the model you want to use, then copy the code on your partner site. You can easily change the files in the site to make it look like you want to only it.

  • You can create new templates in Garageband 10.1.0?

    I am a new user of Garageband and love the feature... when it's working properly.  I am running in a few annoying quirks of the interface user and the usual bugs - crackling, latency, etc.

    One of the more annoying omissions is that I don't see a way to create a "model registration.

    In my setup, I have a Tascam audio interface with 7 microphones and I always want to show me the "Enable registration" button in the user interface.  Whenever I create a new project, I must implement all over again which is a waste of time.  Is there a way to set the default value or create a template from these settings?

    The official answer is: NO, you can't create your own patterns... however...

    There is a solution on how to do it anyway. It is a small surgery under hood, so do it at your own risk:

    • Create a project the way you want it to appear as a model and save it. For example "my model 1.
    • Make a copy of the GarageBand application and open the contents of package (ctr-click on the app and select "Show Package Contents" from the context menu.)
    • Navigate to the following folder: content ➤ resources Project Templates ➤ ➤ ➤ new project and you will be all model files, which are regular files of GarageBand project.
    • Copy your GarageBand project previously saved to this folder location (you can copy over your Porjects won if you like)
    • Launch GarageBand and when the "Project Chooser" window (using the new project"command") you will see your own project next to the other Template System.
    • Unfortunately, your user Templates will not display an icon, just a black square, but other that that, they work like the other model

    This is the screenshot of the contents of the package, GarageBand

    This is a screenshot of how the "project selector" looks like your own custom templates.

    Hope that helps

    Edgar Rothermich - LogicProGEM.com

    (Author of "Graphically improved manuals")

    http://DingDingMusic.com/manuals/

    "I could receive some form of compensation, financial or otherwise, my recommendation or link."


  • You can create a view that filters (ESX host) Linux machines on the view of the Infrastructure?

    Hello

    We have recently implemented Foglight and VMware plugin. As part of the VMware plugin, Foglight pulls in all the Linux VM machines including the ESX host. Our team of Linux only manages the running redhat Linux hosts. They fail the ESX VM guest. That said, is there a way to create a view that shows only the hosts running redhat Linux?

    For example the view of rail infrastructure below contains 88 Linux machines, but nearly half of them are ESX hosts for our Linux team would not see all these. Is it possible to filter these?

    Any help is appreciated.

    Thank you

    Tony

    The easiest way would be to create a personalized, pair it with Infrastructure and then create a dynamic management component.  This will help create you a rule for "All hosts" where you can find just the hosts that are not of the ESX host and run Linux.

    The query would be:

    detail.topologyTypeName! = "VMWESXServer" & os.longName like «% Linux»

  • Any luck, you can create a window in Adobe Muse 2015 and have it NOT in the menu?

    I wish I had a number of windows accessible through a button or another link, but not visible in the application menu.  Not only the data of the window supposed to be restricted, it would be (very) difficult to handle menu.

    Originally, I created a few files HTML 5/CSS 3 in a subfolder, but I like to keep the page as that of the rest of the development application form.  So I would like to create a Muse window that inherits from the main window, but I don't want to telegraph the data smaller in my application.

    Someone at - it ideas?

    Thank you

    If you mean, by 'window', page, then Yes you can. Simply right click on the link in the menu and select 'delete in the menu '.

  • You can create a double panel of accordion in columns? Or a work-around to create this effect?

    I am trying to create a services page.

    I need services in one column and the price in the next.

    I want to use accordion to achieve this goal, but need additional rows and columns.

    Any advise?

    You can add more labels by using the + Panel, Panel tabs can also be used to display the page content column wise.

    If you are looking for something specific, please post some examples.

    Thank you

    Sanjit

  • You can create a Blurb book trade in Lightroom?

    Is it possible to do anything other than photo with Blurb books in ledger?

    I want a book from Blurb trade using Lightroom.

    Hi Vince,

    You can only create Photo books or Photo book with text in Lightroom

    Reference article: the book Module "Julieanne Kost's Blog of »

    Adobe Photoshop Lightroom Help | Create photo books

  • You can create a virtual machine from a snapshot?

    I have a virtual machine running that I am not able to stop, I want to create a snapshot of this virtual machine and take it on a test ESX host.  I thought to take a snapshot of the VM running, I can't stop, and then create the new virtual machine to the snapshot, but I'm not sure how or if this is even possible.  If it is possible what is the best way to go about doing this, if it is not possible is there another way I can archive my goal of not having to stop my VM but always get a copy of what I can get it running on a test of the guests IS.

    You can also try to clone the virtual machine. Cloning in line should work with vSphere. Good luck.

    Paul

Maybe you are looking for