public long getLongProperty( String name ) { return getLongValue( properties, name ); }
public long getLongProperty( String name ) { return getLongValue( properties, name ); }
@JsonIgnore public long getCreated() { return getLongValue( properties, QUEUE_CREATED ); }
@JsonIgnore public long getModified() { return getLongValue( properties, QUEUE_MODIFIED ); }
@JsonIgnore public synchronized long getTimestamp() { if ( properties.containsKey( MESSAGE_TIMESTAMP ) ) { long ts = getLongValue( properties, MESSAGE_TIMESTAMP ); if ( ts != 0 ) { return ts; } } long timestamp = getTimestampInMillis( getUuid() ); properties.put( MESSAGE_TIMESTAMP, timestamp ); return timestamp; }
@JsonIgnore public synchronized UUID getUuid() { UUID uuid = uuid( properties.get( MESSAGE_ID ), null ); if ( uuid == null ) { if ( properties.containsKey( MESSAGE_TIMESTAMP ) ) { long ts = getLongValue( properties, MESSAGE_TIMESTAMP ); uuid = newTimeUUID( ts ); } else { uuid = newTimeUUID(); } properties.put( MESSAGE_ID, uuid ); properties.put( MESSAGE_TIMESTAMP, getTimestampInMillis( uuid ) ); } return uuid; }
@Test public void testRemoveNamespaces() throws Exception { Map props = new HashMap(); props.put("blah.booleanProperty", "true"); props.put("blah.blah.doubleProperty", NumberFormat.getInstance().format(0.124)); props.put("blah.blah.Blah.intProperty", "14"); props.put("longProperty", "999999999"); props.put("3456.stringProperty", "string"); props = PropertiesUtils.removeNamespaces(props); assertTrue(getBooleanValue(props, "booleanProperty", false)); assertEquals(0.124, 0, getDoubleValue(props, "doubleProperty", 0)); assertEquals(14, getIntValue(props, "intProperty", 0)); assertEquals(999999999, 0, getLongValue(props, "longProperty", 0)); assertEquals("string", getString(props, "stringProperty", "")); }
@Test public void testRemoveNamespaces() throws Exception { Map props = new HashMap(); props.put("blah.booleanProperty", "true"); props.put("blah.blah.doubleProperty", NumberFormat.getInstance().format(0.124)); props.put("blah.blah.Blah.intProperty", "14"); props.put("longProperty", "999999999"); props.put("3456.stringProperty", "string"); props = PropertiesUtils.removeNamespaces(props); assertTrue(getBooleanValue(props, "booleanProperty", false)); assertEquals(0.124, 0, getDoubleValue(props, "doubleProperty", 0)); assertEquals(14, getIntValue(props, "intProperty", 0)); assertEquals(999999999, 0, getLongValue(props, "longProperty", 0)); assertEquals("string", getString(props, "stringProperty", "")); }
.credentialsProvider(MoreMapUtils.getUri(copierOptions, CREDENTIAL_PROVIDER, defaultCredentialsProvider)); long multipartUploadPartSize = MapUtils.getLongValue(copierOptions, MULTIPART_UPLOAD_CHUNK_SIZE, ConfigurationVariable.MULTIPART_UPLOAD_THRESHOLD.defaultLongValue()); if (multipartUploadPartSize <= 0) { MapUtils.getString(copierOptions, STORAGE_CLASS, ConfigurationVariable.STORAGE_CLASS.defaultValue())); long maxBandwidth = MapUtils.getLongValue(copierOptions, TASK_BANDWIDTH, ConfigurationVariable.MAX_BANDWIDTH.defaultLongValue()); if (maxBandwidth <= 0) { long multipartUploadThreshold = MapUtils.getLongValue(copierOptions, MULTIPART_UPLOAD_THRESHOLD, ConfigurationVariable.MULTIPART_UPLOAD_THRESHOLD.defaultLongValue()); if (multipartUploadThreshold <= 0) {
.credentialsProvider(MoreMapUtils.getUri(copierOptions, CREDENTIAL_PROVIDER, defaultCredentialsProvider)); long multipartUploadPartSize = MapUtils.getLongValue(copierOptions, MULTIPART_UPLOAD_CHUNK_SIZE, ConfigurationVariable.MULTIPART_UPLOAD_THRESHOLD.defaultLongValue()); if (multipartUploadPartSize <= 0) { MapUtils.getString(copierOptions, STORAGE_CLASS, ConfigurationVariable.STORAGE_CLASS.defaultValue())); long maxBandwidth = MapUtils.getLongValue(copierOptions, TASK_BANDWIDTH, ConfigurationVariable.MAX_BANDWIDTH.defaultLongValue()); if (maxBandwidth <= 0) { long multipartUploadThreshold = MapUtils.getLongValue(copierOptions, MULTIPART_UPLOAD_THRESHOLD, ConfigurationVariable.MULTIPART_UPLOAD_THRESHOLD.defaultLongValue()); if (multipartUploadThreshold <= 0) {