@Override public void removeValueMeta( String valueName ) throws KettleValueException { lock.writeLock().lock(); try { int index = indexOfValue( valueName ); if ( index < 0 ) { throw new KettleValueException( "Unable to find value metadata with name '" + valueName + "', so I can't delete it." ); } removeValueMeta( index ); } finally { lock.writeLock().unlock(); } }
@Override List<String> doCall() throws Exception { Random random = new Random(); List<String> result = new LinkedList<String>( toRemove ); for ( Iterator<String> it = result.iterator(); it.hasNext() && condition.get(); ) { String name = it.next(); rowMeta.removeValueMeta( name ); it.remove(); Thread.sleep( random.nextInt( 100 ) ); } return result; }