/** * @deprecated use {@link #getSplitEvery(VariableSpace)} or {@link #getSplitEveryRows()} * @return Returns the splitEvery. */ @Override public int getSplitEvery() { return Const.toInt( splitEveryRows, 0 ); }
/** * @return the maximum pool size */ @Override public int getMaximumPoolSize() { return Const.toInt( attributes.getProperty( ATTRIBUTE_MAXIMUM_POOL_SIZE ), ConnectionPoolUtil.defaultMaximumNrOfConnections ); }
/** * @return the initial pool size */ @Override public int getInitialPoolSize() { return Const.toInt( attributes.getProperty( ATTRIBUTE_INITIAL_POOL_SIZE ), ConnectionPoolUtil.defaultInitialNrOfConnections ); }
/** * Create new non-blocking-queue with maxSize capacity. * * @param maxSize */ public BlockingRowSet( int maxSize ) { super(); // create an empty queue queArray = new ArrayBlockingQueue<Object[]>( maxSize, false ); timeoutGet = Const.toInt( System.getProperty( Const.KETTLE_ROWSET_GET_TIMEOUT ), Const.TIMEOUT_GET_MILLIS ); timeoutPut = Const.toInt( System.getProperty( Const.KETTLE_ROWSET_PUT_TIMEOUT ), Const.TIMEOUT_PUT_MILLIS ); }
public RGB getGraphColorRGB() { int r = Const.toInt( properties.getProperty( STRING_GRAPH_COLOR_R ), ConstUI.COLOR_GRAPH_RED ); // default White int g = Const.toInt( properties.getProperty( STRING_GRAPH_COLOR_G ), ConstUI.COLOR_GRAPH_GREEN ); int b = Const.toInt( properties.getProperty( STRING_GRAPH_COLOR_B ), ConstUI.COLOR_GRAPH_BLUE ); return new RGB( r, g, b ); }
public void getCompositeData( ImportRuleInterface importRule ) { TransformationHasDescriptionImportRule rule = (TransformationHasDescriptionImportRule) importRule; rule.setMinLength( Const.toInt( text.getText(), 0 ) ); } }
@Override public String getURL( String hostname, String port, String databaseName ) { if ( !Utils.isEmpty( port ) && Const.toInt( port, -1 ) > 0 ) { return "jdbc:luciddb:http://" + hostname + ":" + port; } else { return "jdbc:luciddb:http://" + hostname; } }
private int getReadFirst( String protocol ) { if ( protocol.equals( MailConnectionMeta.PROTOCOL_STRING_POP3 ) ) { return Const.toInt( meta.getFirstMails(), 0 ); } if ( protocol.equals( MailConnectionMeta.PROTOCOL_STRING_IMAP ) ) { return Const.toInt( meta.getFirstIMAPMails(), 0 ); } //and we do not have this option for MBOX on UI. return 0; }
@VisibleForTesting SFTPClient createSftpClient( String realServerName, String realServerPort, String realUsername, String realKeyFilename, String realPassPhrase ) throws KettleJobException, UnknownHostException { return new SFTPClient( InetAddress.getByName( realServerName ), Const.toInt( realServerPort, 22 ), realUsername, realKeyFilename, realPassPhrase ); }
private LoggingRegistry() { this.map = new ConcurrentHashMap<String, LoggingObjectInterface>(); this.childrenMap = new ConcurrentHashMap<String, List<String>>(); this.fileWriterBuffers = new ConcurrentHashMap<>(); this.lastModificationTime = new Date(); this.maxSize = Const.toInt( EnvUtil.getSystemProperty( "KETTLE_MAX_LOGGING_REGISTRY_SIZE" ), DEFAULT_MAX_SIZE ); }
public FontData getFixedFont() { FontData def = getDefaultFontData(); String name = properties.getProperty( STRING_FONT_FIXED_NAME ); int size = Const.toInt( properties.getProperty( STRING_FONT_FIXED_SIZE ), def.getHeight() ); int style = Const.toInt( properties.getProperty( STRING_FONT_FIXED_STYLE ), def.getStyle() ); return new FontData( name, size, style ); }
public static ObjectUsageCount fromString( String string ) { String[] splits = string.split( ";" ); if ( splits.length >= 2 ) { return new ObjectUsageCount( splits[0], Const.toInt( splits[1], 1 ) ); } return new ObjectUsageCount( string, 1 ); }
public FontData getDefaultFont() { FontData def = getDefaultFontData(); if ( isOSLookShown() ) { return def; } String name = properties.getProperty( STRING_FONT_DEFAULT_NAME, def.getName() ); int size = Const.toInt( properties.getProperty( STRING_FONT_DEFAULT_SIZE ), def.getHeight() ); int style = Const.toInt( properties.getProperty( STRING_FONT_DEFAULT_STYLE ), def.getStyle() ); return new FontData( name, size, style ); }
private void readData( Node stepnode ) { passAllRows = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "pass_all_rows" ) ); directory = XMLHandler.getTagValue( stepnode, "directory" ); prefix = XMLHandler.getTagValue( stepnode, "prefix" ); cacheSize = Const.toInt( XMLHandler.getTagValue( stepnode, "cache_size" ), CACHE_SIZE ); compressFiles = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "compress" ) ); }
@Override public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException { super.loadXML( stepnode, databases, metaStore ); targetFieldName = XMLHandler.getTagValue( stepnode, ConcatFieldsNodeNameSpace, "targetFieldName" ); targetFieldLength = Const.toInt( XMLHandler.getTagValue( stepnode, ConcatFieldsNodeNameSpace, "targetFieldLength" ), 0 ); removeSelectedFields = "Y" .equalsIgnoreCase( XMLHandler .getTagValue( stepnode, ConcatFieldsNodeNameSpace, "removeSelectedFields" ) ); }
public JaninoMetaFunction( Node calcnode ) { fieldName = XMLHandler.getTagValue( calcnode, "field_name" ); formula = XMLHandler.getTagValue( calcnode, "formula_string" ); valueType = ValueMetaFactory.getIdForValueMeta( XMLHandler.getTagValue( calcnode, "value_type" ) ); valueLength = Const.toInt( XMLHandler.getTagValue( calcnode, "value_length" ), -1 ); valuePrecision = Const.toInt( XMLHandler.getTagValue( calcnode, "value_precision" ), -1 ); replaceField = XMLHandler.getTagValue( calcnode, "replace_field" ); }
public FixedFileInputField( Node fnode ) { name = XMLHandler.getTagValue( fnode, "name" ); type = ValueMetaFactory.getIdForValueMeta( XMLHandler.getTagValue( fnode, "type" ) ); format = XMLHandler.getTagValue( fnode, "format" ); trimType = ValueMetaString.getTrimTypeByCode( XMLHandler.getTagValue( fnode, "trim_type" ) ); currency = XMLHandler.getTagValue( fnode, "currency" ); decimal = XMLHandler.getTagValue( fnode, "decimal" ); grouping = XMLHandler.getTagValue( fnode, "group" ); width = Const.toInt( XMLHandler.getTagValue( fnode, "width" ), -1 ); length = Const.toInt( XMLHandler.getTagValue( fnode, "length" ), -1 ); precision = Const.toInt( XMLHandler.getTagValue( fnode, "precision" ), -1 ); }
private void readData( Node stepnode ) { Node fields = XMLHandler.getSubNode( stepnode, "fields" ); int nrfields = XMLHandler.countNodes( fields, "field" ); allocate( nrfields ); for ( int i = 0; i < nrfields; i++ ) { Node line = XMLHandler.getSubNodeByNr( fields, "field", i ); fieldname[i] = XMLHandler.getTagValue( line, "name" ); type[i] = ValueMetaFactory.getIdForValueMeta( XMLHandler.getTagValue( line, "type" ) ); length[i] = Const.toInt( XMLHandler.getTagValue( line, "length" ), -2 ); precision[i] = Const.toInt( XMLHandler.getTagValue( line, "precision" ), -2 ); } }
public YamlInputField( Node fnode ) throws KettleValueException { setName( XMLHandler.getTagValue( fnode, "name" ) ); setPath( XMLHandler.getTagValue( fnode, "path" ) ); setType( ValueMetaFactory.getIdForValueMeta( XMLHandler.getTagValue( fnode, "type" ) ) ); setFormat( XMLHandler.getTagValue( fnode, "format" ) ); setCurrencySymbol( XMLHandler.getTagValue( fnode, "currency" ) ); setDecimalSymbol( XMLHandler.getTagValue( fnode, "decimal" ) ); setGroupSymbol( XMLHandler.getTagValue( fnode, "group" ) ); setLength( Const.toInt( XMLHandler.getTagValue( fnode, "length" ), -1 ) ); setPrecision( Const.toInt( XMLHandler.getTagValue( fnode, "precision" ), -1 ) ); setTrimType( getTrimTypeByCode( XMLHandler.getTagValue( fnode, "trim_type" ) ) ); }