Examples of MapBuilder


Examples of com.alibaba.citrus.util.internal.ToStringBuilder.MapBuilder

        return parameterSubstituted;
    }

    @Override
    public String toString() {
        MapBuilder mb = new MapBuilder();

        if (uri != null) {
            mb.append("uri", uri);
        }

        if (!isEmptyArray(parameters)) {
            mb.append("params", parameters);
        }

        if (!flags.isEmpty()) {
            mb.append("flags", flags);
        }

        return new ToStringBuilder().append("Substitution").append(mb).toString();
    }
View Full Code Here

Examples of com.fasterxml.jackson.jr.ob.impl.MapBuilder

            }
        } else switch (typeId) {
        // Structured types:
        case SER_MAP:
        {
            MapBuilder b = _mapBuilder;
            if (type != Map.class) {
                b = b.newBuilder(type);
            }
            return _readFromObject(b);
        }
           
        case SER_LIST:
        case SER_COLLECTION:
        {
            CollectionBuilder b = _collectionBuilder;
            if (type != List.class && type != Collection.class) {
                b = b.newBuilder(type);
            }
            return _readFromArray(b, true);
        }

        case SER_OBJECT_ARRAY:
View Full Code Here

Examples of org.apache.sirona.cube.MapBuilder

        return cube.globalPayload(answer);
    }

    public void register(final String registrationUrl) {
        if (registrationUrl != null) {
            cube.post(cube.buildEvent(cube.newEventStream(), REGISTRATION_TYPE, 0, new MapBuilder().add("url", registrationUrl).map()));
        }
    }
View Full Code Here

Examples of org.apache.torque.map.MapBuilder

    {
        synchronized (mapBuilders)
        {
            try
            {
                MapBuilder mb = (MapBuilder) mapBuilders.get(name);

                if (mb == null)
                {
                    mb = (MapBuilder) Class.forName(name).newInstance();
                    // Cache the MapBuilder before it is built.
                    mapBuilders.put(name, mb);
                }

                // Build the MapBuilder in its own synchronized block to
                //  avoid locking up the whole Hashtable while doing so.
                // Note that *all* threads need to do a sync check on isBuilt()
                //  to avoid grabing an uninitialized MapBuilder. This, however,
                //  is a relatively fast operation.

                if (mb.isBuilt())
                {
                    return mb;
                }

                try
                {
                    mb.doBuild();
                }
                catch (Exception e)
                {
                    // need to think about whether we'd want to remove
                    //  the MapBuilder from the cache if it can't be
View Full Code Here

Examples of org.apache.torque.map.MapBuilder

     */
    public static MapBuilder getMapBuilder(String name)
    {
        try
        {
            MapBuilder mb = (MapBuilder) mapBuilders.get(name);
            // Use the 'double-check pattern' for syncing
            //  caching of the MapBuilder.
            if (mb == null)
            {
                synchronized (mapBuilders)
                {
                    mb = (MapBuilder) mapBuilders.get(name);
                    if (mb == null)
                    {
                        mb = (MapBuilder) Class.forName(name).newInstance();
                        // Cache the MapBuilder before it is built.
                        mapBuilders.put(name, mb);
                    }
                }
            }

            // Build the MapBuilder in its own synchronized block to
            //  avoid locking up the whole Hashtable while doing so.
            // Note that *all* threads need to do a sync check on isBuilt()
            //  to avoid grabing an uninitialized MapBuilder. This, however,
            //  is a relatively fast operation.
            synchronized (mb)
            {
                if (!mb.isBuilt())
                {
                    try
                    {
                        mb.doBuild();
                    }
                    catch (Exception e)
                    {
                        // need to think about whether we'd want to remove
                        //  the MapBuilder from the cache if it can't be
View Full Code Here

Examples of org.apache.torque.map.MapBuilder

                if (null == entry.getValue())
                {
                    try
                    {
                        // create and build the MapBuilder
                        MapBuilder builder = (MapBuilder) Class.forName((String) entry.getKey()).newInstance();
       
                        if (!builder.isBuilt())
                        {
                            builder.doBuild();
                        }
   
                        entry.setValue(builder);
                    }
                    catch (Exception e)
View Full Code Here

Examples of org.apache.torque.map.MapBuilder

    public MapBuilder getMapBuilder(String className)
        throws TorqueException
    {
        try
        {
            MapBuilder mb = (MapBuilder)mapBuilderCache.get(className);

            if (mb == null)
            {
                mb = (MapBuilder) Class.forName(className).newInstance();
                // Cache the MapBuilder before it is built.
                mapBuilderCache.put(className, mb);
            }

            if (mb.isBuilt())
            {
                return mb;
            }

            try
            {
                mb.doBuild();
            }
            catch (Exception e)
            {
                // remove the MapBuilder from the cache if it can't be built correctly
                mapBuilderCache.remove(className);
View Full Code Here

Examples of org.apache.torque.map.MapBuilder

    {
        synchronized (mapBuilders)
        {
            try
            {
                MapBuilder mb = (MapBuilder) mapBuilders.get(name);

                if (mb == null)
                {
                    mb = (MapBuilder) Class.forName(name).newInstance();
                    // Cache the MapBuilder before it is built.
                    mapBuilders.put(name, mb);
                }

                // Build the MapBuilder in its own synchronized block to
                //  avoid locking up the whole Hashtable while doing so.
                // Note that *all* threads need to do a sync check on isBuilt()
                //  to avoid grabing an uninitialized MapBuilder. This, however,
                //  is a relatively fast operation.

                if (mb.isBuilt())
                {
                    return mb;
                }

                try
                {
                    mb.doBuild();
                }
                catch (Exception e)
                {
                    // need to think about whether we'd want to remove
                    //  the MapBuilder from the cache if it can't be
View Full Code Here

Examples of org.apache.torque.map.MapBuilder

     */
    public static MapBuilder getMapBuilder(String name)
    {
        try
        {
            MapBuilder mb = (MapBuilder) mapBuilders.get(name);
            // Use the 'double-check pattern' for syncing
            //  caching of the MapBuilder.
            if (mb == null)
            {
                synchronized (mapBuilders)
                {
                    mb = (MapBuilder) mapBuilders.get(name);
                    if (mb == null)
                    {
                        mb = (MapBuilder) Class.forName(name).newInstance();
                        // Cache the MapBuilder before it is built.
                        mapBuilders.put(name, mb);
                    }
                }
            }

            // Build the MapBuilder in its own synchronized block to
            //  avoid locking up the whole Hashtable while doing so.
            // Note that *all* threads need to do a sync check on isBuilt()
            //  to avoid grabing an uninitialized MapBuilder. This, however,
            //  is a relatively fast operation.
            synchronized (mb)
            {
                if (!mb.isBuilt())
                {
                    try
                    {
                        mb.doBuild();
                    }
                    catch (Exception e)
                    {
                        // need to think about whether we'd want to remove
                        //  the MapBuilder from the cache if it can't be
View Full Code Here

Examples of org.apache.torque.map.MapBuilder

                if (null == entry.getValue())
                {
                    try
                    {
                        // create and build the MapBuilder
                        MapBuilder builder = (MapBuilder) Class.forName((String) entry.getKey()).newInstance();
       
                        if (!builder.isBuilt())
                        {
                            builder.doBuild();
                        }
   
                        entry.setValue(builder);
                    }
                    catch (Exception e)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.