Package com.google.common.collect

Examples of com.google.common.collect.ImmutableMap$RegularImmutableMap$EntrySet


                                          tags);
        }catch(JSONException e){
          return null;
        }
      } else {
        ImmutableMap contentRewrite = (ImmutableMap) object;
        ImmutableList<String> tagsList = (ImmutableList<String>) contentRewrite.get(INCLUDE_TAGS_KEY);
        for (Object tag : tagsList) {
          tags.add(tag.toString().toLowerCase());
        }
        return new ContentRewriterFeature(spec,
                                          (String)contentRewrite.get(INCLUDE_URLS_KEY),
                                          (String)contentRewrite.get(EXCLUDE_TAGS_KEY),
                                          (String)contentRewrite.get(EXPIRES_KEY),
                                          tags);
      }
  }
View Full Code Here


    return created();
  }

  public static Result getDBStatistics(){
    ODatabaseRecordTx db = DbHelper.getConnection();
    ImmutableMap response;
    try {
      String bbId = Internal.INSTALLATION_ID.getValueAsString();
      if (bbId==null) bbId="00-00-00"; //--<<--- this prevents an OrientDB bug retrieving keys
      response = ImmutableMap.<String,Object>builder().
          put("installation", (Object)ImmutableMap.of(
View Full Code Here

      long collectionsCount = collDao.getCount();
      long filesCount = fileDao.getCount();
     
      List<ODocument> collections = collDao.get(QueryParams.getInstance());
      ArrayList<ImmutableMap> collMap = collectionsDetails(collections);
      ImmutableMap response = ImmutableMap.of(
          "users", usersCount,
          "collections", collectionsCount,
          "collections_details", collMap,
          "assets",assetsCount,
          "files",filesCount
          );
      if (Logger.isDebugEnabled()) Logger.debug(response.toString());
      if (Logger.isTraceEnabled()) Logger.trace("Method End");
      return response;
    }
View Full Code Here

      map.put("physical_size", DbHelper.getDBTotalSize());
      map.put("datafile_freespace", DbHelper.getDBStorageFreeSpace());
      map.put("size_threshold_percentage", BBConfiguration.getDBAlertThreshold());
     
     
      ImmutableMap response=ImmutableMap.builder().build().copyOf(map);

      if (Logger.isTraceEnabled()) Logger.trace("Method End");
      return response;
    }
View Full Code Here

      return response;
    }
   
    public static ImmutableMap os() {
      if (Logger.isTraceEnabled()) Logger.trace("Method Start");
      ImmutableMap response=null;
      if (BBConfiguration.getStatisticsSystemOS()){
        response = ImmutableMap.of(
            "os_name", System.getProperty("os.name"),
            "os_arch",  System.getProperty("os.arch"),
            "os_version",  System.getProperty("os.version"),
View Full Code Here

      return response;
    }
   
    public static ImmutableMap java() {
      if (Logger.isTraceEnabled()) Logger.trace("Method Start");
      ImmutableMap response = ImmutableMap.of(
          "java_class_version", System.getProperty("java.class.version"),
          "java_vendor",  System.getProperty("java.vendor"),
          "java_vendor_url",  System.getProperty("java.vendor.url"),
          "java_version",  System.getProperty("java.version")
          );
View Full Code Here

      return response;
   
   
    public static ImmutableMap memory() {
      if (Logger.isTraceEnabled()) Logger.trace("Method Start");
      ImmutableMap response=null;

      if (BBConfiguration.getStatisticsSystemMemory()){
        Runtime rt = Runtime.getRuntime();
        long maxMemory=rt.maxMemory();
        long freeMemory=rt.freeMemory();
View Full Code Here

    GenericFixed genericFixed = new GenericData.Fixed(
        Schema.createFixed("fixed", null, null, 1), new byte[] { (byte) 65 });

    List<Integer> emptyArray = new ArrayList<Integer>();
    ImmutableMap emptyMap = new ImmutableMap.Builder<String, Integer>().build();

    GenericData.Record record = new GenericRecordBuilder(schema)
        .set("mynull", null)
        .set("myboolean", true)
        .set("myint", 1)
View Full Code Here

        "      {\"type\": \"column\", \"value\": \"m:name\"} }" +
        "  ]" +
        "}");
    Map<Integer, FieldMapping> keys = ColumnMappingParser
        .parseKeyMappingsFromSchemaFields(schema);
    ImmutableMap expected = ImmutableMap.builder()
        .put(0, FieldMapping.key("username"))
        .put(1, FieldMapping.key("id"))
        .build();
    Assert.assertEquals(expected, keys);
  }
View Full Code Here

          localObject3 = ((Iterator)localObject2).next();
          j--;
          localLinkedHashMap.put(localObject3, get(localObject3, this.defaultLoader));
        }
      }
      ImmutableMap localImmutableMap = ImmutableMap.copyOf(localLinkedHashMap);
      return localImmutableMap;
    }
    finally
    {
      this.globalStatsCounter.recordHits(i);
View Full Code Here

TOP

Related Classes of com.google.common.collect.ImmutableMap$RegularImmutableMap$EntrySet

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.