Package java.util.concurrent

Examples of java.util.concurrent.ConcurrentHashMap$MapReduceKeysTask


      }

      @SuppressWarnings("unchecked")
      protected Map createMap()
      {
         return new ConcurrentHashMap();
      }
View Full Code Here


      ByteArrayKey o = new ByteArrayKey("123".getBytes());
      marshallAndAssertEquality(o);
   }

   public void testConcurrentHashMap() throws Exception {
      ConcurrentHashMap map = new ConcurrentHashMap();
      map.put(1, "v1");
      map.put(2, "v2");
      map.put(3, "v3");
      marshallAndAssertEquality(map);
   }
View Full Code Here

        if (sipStack.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {
            sipStack.getStackLogger().logDebug("Creating clientTransaction " + this);
            sipStack.getStackLogger().logStackTrace();
        }
        // this.startTransactionTimer();
        this.sipDialogs = new ConcurrentHashMap();
    }
View Full Code Here

      ByteArrayKey o = new ByteArrayKey("123".getBytes());
      marshallAndAssertEquality(o);
   }

   public void testConcurrentHashMap() throws Exception {
      ConcurrentHashMap map = new ConcurrentHashMap();
      map.put(1, "v1");
      map.put(2, "v2");
      map.put(3, "v3");
      marshallAndAssertEquality(map);
   }
View Full Code Here

     */
    private void mergeParameters() {

        if (parameters != null)
            return;
        Map results = new ConcurrentHashMap();
        String names[] = context.findParameters();
        for (int i = 0; i < names.length; i++)
            results.put(names[i], context.findParameter(names[i]));
        ApplicationParameter params[] =
            context.findApplicationParameters();
        for (int i = 0; i < params.length; i++) {
            if (params[i].getOverride()) {
                if (results.get(params[i].getName()) == null)
                    results.put(params[i].getName(), params[i].getValue());
            } else {
                results.put(params[i].getName(), params[i].getValue());
            }
        }
        parameters = results;

    }
View Full Code Here

    private String QUEUE_PREFIX = "queue.";
    private String TOPIC_PREFIX = "topic.";

    public Context getInitialContext(Hashtable environment) throws NamingException
    {
        Map data = new ConcurrentHashMap();

        String file = null;
        try
        {
View Full Code Here

    }

    public <T extends ConfigObjectType<T, C>, C extends ConfiguredObject<T, C>> Collection<? extends C> getConfiguredObjects(ConfigObjectType<T,C> type)
    {
        ConcurrentHashMap typeMap = _typeMap.get(type);
        if(typeMap != null)
        {
            return typeMap.values();
        }
        else
        {
            return Collections.EMPTY_LIST;
        }
View Full Code Here

    }

    public <T extends ConfigObjectType<T, C>, C extends ConfiguredObject<T, C>> void addConfiguredObject(ConfiguredObject<T, C> object)
    {
        ConcurrentHashMap typeMap = _typeMap.get(object.getConfigType());
        if(typeMap == null)
        {
            typeMap = new ConcurrentHashMap();
            ConcurrentHashMap oldMap = _typeMap.putIfAbsent(object.getConfigType(), typeMap);
            if(oldMap != null)
            {
                typeMap = oldMap;
            }
View Full Code Here

    }


    public <T extends ConfigObjectType<T, C>, C extends ConfiguredObject<T, C>> void removeConfiguredObject(ConfiguredObject<T, C> object)
    {
        ConcurrentHashMap typeMap = _typeMap.get(object.getConfigType());
        if(typeMap != null)
        {
            typeMap.remove(object.getQMFId());
            sendEvent(Event.DELETED, object);
        }
    }
View Full Code Here

  Set entries = backingFile.getRecords();
        int eSize = entries.size();
        int mSize = this.size();
        if (eSize > mSize) {
            recordMap = new ConcurrentHashMap(eSize);
        } else {
            recordMap = new ConcurrentHashMap(mSize);
        }

  Iterator iter = entries.iterator();
  while (iter.hasNext()) {
      VRecordRAF record = (VRecordRAF)iter.next();
View Full Code Here

TOP

Related Classes of java.util.concurrent.ConcurrentHashMap$MapReduceKeysTask

Copyright © 2018 www.massapicom. 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.