private static Map<PTableKey, PSchema> cloneSchemaMap(Map<PTableKey, PSchema> schemas, int expectedCapacity) { Map<PTableKey, PSchema> newSchemas = newSchemaMap(Math.max(schemas.size(), expectedCapacity)); // Copy value so that access time isn't changing anymore for (PSchema schema : schemas.values()) { newSchemas.put(schema.getSchemaKey(), new PSchema(schema)); } return newSchemas; }
public PMetaDataCache(int initialCapacity, long maxByteSize, TimeKeeper timeKeeper, PTableRefFactory tableRefFactory) { this.currentByteSize = 0; this.maxByteSize = maxByteSize; this.expectedCapacity = initialCapacity; this.tables = newMap(this.expectedCapacity); this.functions = newFunctionMap(this.expectedCapacity); this.timeKeeper = timeKeeper; this.schemas = newSchemaMap(this.expectedCapacity); this.tableRefFactory = tableRefFactory; }
private static Map<PTableKey, PSchema> cloneSchemaMap(Map<PTableKey, PSchema> schemas, int expectedCapacity) { Map<PTableKey, PSchema> newSchemas = newSchemaMap(Math.max(schemas.size(), expectedCapacity)); // Copy value so that access time isn't changing anymore for (PSchema schema : schemas.values()) { newSchemas.put(schema.getSchemaKey(), new PSchema(schema)); } return newSchemas; }
private static Map<PTableKey, PSchema> cloneSchemaMap(Map<PTableKey, PSchema> schemas, int expectedCapacity) { Map<PTableKey, PSchema> newSchemas = newSchemaMap(Math.max(schemas.size(), expectedCapacity)); // Copy value so that access time isn't changing anymore for (PSchema schema : schemas.values()) { newSchemas.put(schema.getSchemaKey(), new PSchema(schema)); } return newSchemas; }
public PMetaDataCache(int initialCapacity, long maxByteSize, TimeKeeper timeKeeper, PTableRefFactory tableRefFactory) { this.currentByteSize = 0; this.maxByteSize = maxByteSize; this.expectedCapacity = initialCapacity; this.tables = newMap(this.expectedCapacity); this.functions = newFunctionMap(this.expectedCapacity); this.timeKeeper = timeKeeper; this.schemas = newSchemaMap(this.expectedCapacity); this.tableRefFactory = tableRefFactory; }
public PMetaDataCache(int initialCapacity, long maxByteSize, TimeKeeper timeKeeper, PTableRefFactory tableRefFactory) { this.currentByteSize = 0; this.maxByteSize = maxByteSize; this.expectedCapacity = initialCapacity; this.tables = newMap(this.expectedCapacity); this.functions = newFunctionMap(this.expectedCapacity); this.timeKeeper = timeKeeper; this.schemas = newSchemaMap(this.expectedCapacity); this.tableRefFactory = tableRefFactory; }