idx
int64 0
41.2k
| question
stringlengths 74
4.04k
| target
stringlengths 7
750
|
|---|---|---|
38,700
|
public static < C > PortableClassAccess < C > get ( Class < C > clazz ) { @ SuppressWarnings ( "unchecked" ) PortableClassAccess < C > access = ( PortableClassAccess < C > ) CLASS_ACCESSES . get ( clazz ) ; if ( access != null ) { return access ; } access = new PortableClassAccess < C > ( clazz ) ; CLASS_ACCESSES . putIfAbsent ( clazz , access ) ; return access ; }
|
Get a new instance that can access the given Class . If the ClassAccess for this class has not been obtained before then the specific PortableClassAccess is created by generating a specialised subclass of this class and returning it .
|
38,701
|
@ SuppressWarnings ( "deprecation" ) protected ID extractId ( T entity ) { final Class < ? > entityClass = TypeHelper . getTypeArguments ( JpaBaseRepository . class , this . getClass ( ) ) . get ( 0 ) ; final SessionFactory sf = ( SessionFactory ) ( getEntityManager ( ) . getEntityManagerFactory ( ) ) ; final ClassMetadata cmd = sf . getClassMetadata ( entityClass ) ; final SessionImplementor si = ( SessionImplementor ) ( getEntityManager ( ) . getDelegate ( ) ) ; @ SuppressWarnings ( "unchecked" ) final ID result = ( ID ) cmd . getIdentifier ( entity , si ) ; return result ; }
|
Determines the ID for the entity
|
38,702
|
public final < T > T allocateInstance ( Class < T > clazz ) throws IllegalStateException { try { @ SuppressWarnings ( "unchecked" ) final T result = ( T ) THE_UNSAFE . allocateInstance ( clazz ) ; return result ; } catch ( InstantiationException e ) { throw new IllegalStateException ( "Cannot allocate instance: " + e . getMessage ( ) , e ) ; } }
|
Construct and allocate on the heap an instant of the given class without calling the class constructor
|
38,703
|
public final < T > T shallowCopy ( T obj ) { long size = shallowSizeOf ( obj ) ; long address = THE_UNSAFE . allocateMemory ( size ) ; long start = toAddress ( obj ) ; THE_UNSAFE . copyMemory ( start , address , size ) ; @ SuppressWarnings ( "unchecked" ) final T result = ( T ) fromAddress ( address ) ; return result ; }
|
Performs a shallow copy of the given object - a new instance is allocated with the same contents . Any object references inside the copy will be the same as the original object .
|
38,704
|
public final Object fromAddress ( long address ) { Object [ ] array = new Object [ ] { null } ; long baseOffset = THE_UNSAFE . arrayBaseOffset ( Object [ ] . class ) ; THE_UNSAFE . putLong ( array , baseOffset , address ) ; return array [ 0 ] ; }
|
Returns the object located at the given memory address
|
38,705
|
public final void copyPrimitiveField ( Object source , Object copy , Field field ) { copyPrimitiveAtOffset ( source , copy , field . getType ( ) , getObjectFieldOffset ( field ) ) ; }
|
Copy the value from the given field from the source into the target . The field specified must contain a primitive
|
38,706
|
public final void copyPrimitiveAtOffset ( Object source , Object copy , Class < ? > type , long offset ) { if ( java . lang . Boolean . TYPE == type ) { boolean origFieldValue = THE_UNSAFE . getBoolean ( source , offset ) ; THE_UNSAFE . putBoolean ( copy , offset , origFieldValue ) ; } else if ( java . lang . Byte . TYPE == type ) { byte origFieldValue = THE_UNSAFE . getByte ( source , offset ) ; THE_UNSAFE . putByte ( copy , offset , origFieldValue ) ; } else if ( java . lang . Character . TYPE == type ) { char origFieldValue = THE_UNSAFE . getChar ( source , offset ) ; THE_UNSAFE . putChar ( copy , offset , origFieldValue ) ; } else if ( java . lang . Short . TYPE == type ) { short origFieldValue = THE_UNSAFE . getShort ( source , offset ) ; THE_UNSAFE . putShort ( copy , offset , origFieldValue ) ; } else if ( java . lang . Integer . TYPE == type ) { int origFieldValue = THE_UNSAFE . getInt ( source , offset ) ; THE_UNSAFE . putInt ( copy , offset , origFieldValue ) ; } else if ( java . lang . Long . TYPE == type ) { long origFieldValue = THE_UNSAFE . getLong ( source , offset ) ; THE_UNSAFE . putLong ( copy , offset , origFieldValue ) ; } else if ( java . lang . Float . TYPE == type ) { float origFieldValue = THE_UNSAFE . getFloat ( source , offset ) ; THE_UNSAFE . putFloat ( copy , offset , origFieldValue ) ; } else if ( java . lang . Double . TYPE == type ) { double origFieldValue = THE_UNSAFE . getDouble ( source , offset ) ; THE_UNSAFE . putDouble ( copy , offset , origFieldValue ) ; } }
|
Copies the primitive of the specified type from the given field offset in the source object to the same location in the copy
|
38,707
|
public final void deepCopyObjectAtOffset ( Object source , Object copy , Class < ? > fieldClass , long offset ) { deepCopyObjectAtOffset ( source , copy , fieldClass , offset , new IdentityHashMap < Object , Object > ( 100 ) ) ; }
|
Copies the object of the specified type from the given field offset in the source object to the same location in the copy visiting the object during the copy so that its fields are also copied
|
38,708
|
public final void deepCopyArrayField ( Object obj , Object copy , Field field , IdentityHashMap < Object , Object > referencesToReuse ) { deepCopyArrayAtOffset ( obj , copy , field . getType ( ) , getObjectFieldOffset ( field ) , referencesToReuse ) ; }
|
Copies the array of the specified type from the given field in the source object to the same field in the copy visiting the array during the copy so that its contents are also copied
|
38,709
|
public final void putObject ( Object parent , long offset , Object value ) { THE_UNSAFE . putObject ( parent , offset , value ) ; }
|
Puts the object s reference at the given offset of the supplied parent object
|
38,710
|
public static Class < ? > getClass ( ClassLoader classLoader , String className ) { try { final Class < ? > clazz ; if ( PRIMITIVE_MAPPING . containsKey ( className ) ) { String qualifiedName = "[" + PRIMITIVE_MAPPING . get ( className ) ; clazz = Class . forName ( qualifiedName , true , classLoader ) . getComponentType ( ) ; } else { clazz = Class . forName ( determineQualifiedName ( className ) , true , classLoader ) ; } return clazz ; } catch ( ClassNotFoundException ex ) { int lastSeparatorIndex = className . lastIndexOf ( PACKAGE_SEPARATOR_CHARACTER ) ; if ( lastSeparatorIndex != - 1 ) { return getClass ( classLoader , className . substring ( 0 , lastSeparatorIndex ) + INNER_CLASS_SEPARATOR_CHAR + className . substring ( lastSeparatorIndex + 1 ) ) ; } throw new IllegalArgumentException ( "Unable to unmarshall String to Class: " + className ) ; } }
|
Attempt to load the class matching the given qualified name
|
38,711
|
public static String determineQualifiedName ( String className ) { String readableClassName = StringUtils . removeWhitespace ( className ) ; if ( readableClassName == null ) { throw new IllegalArgumentException ( "readableClassName must not be null." ) ; } else if ( readableClassName . endsWith ( "[]" ) ) { StringBuilder classNameBuffer = new StringBuilder ( ) ; while ( readableClassName . endsWith ( "[]" ) ) { readableClassName = readableClassName . substring ( 0 , readableClassName . length ( ) - 2 ) ; classNameBuffer . append ( "[" ) ; } String abbreviation = PRIMITIVE_MAPPING . get ( readableClassName ) ; if ( abbreviation == null ) { classNameBuffer . append ( "L" ) . append ( readableClassName ) . append ( ";" ) ; } else { classNameBuffer . append ( abbreviation ) ; } readableClassName = classNameBuffer . toString ( ) ; } return readableClassName ; }
|
Given a readable class name determine the JVM Qualified Name
|
38,712
|
public static String determineReadableClassName ( String qualifiedName ) { String readableClassName = StringUtils . removeWhitespace ( qualifiedName ) ; if ( readableClassName == null ) { throw new IllegalArgumentException ( "qualifiedName must not be null." ) ; } else if ( readableClassName . startsWith ( "[" ) ) { StringBuilder classNameBuffer = new StringBuilder ( ) ; while ( readableClassName . startsWith ( "[" ) ) { classNameBuffer . append ( "[]" ) ; readableClassName = readableClassName . substring ( 1 ) ; } if ( PRIMITIVE_MAPPING . containsValue ( readableClassName ) ) { for ( Map . Entry < String , String > next : PRIMITIVE_MAPPING . entrySet ( ) ) { if ( next . getValue ( ) . equals ( readableClassName ) ) { readableClassName = next . getKey ( ) + classNameBuffer . toString ( ) ; break ; } } } else if ( readableClassName . startsWith ( "L" ) && readableClassName . endsWith ( ";" ) ) { readableClassName = readableClassName . substring ( 1 , readableClassName . length ( ) - 1 ) + classNameBuffer . toString ( ) ; } else { throw new IllegalArgumentException ( "qualifiedName was invalid {" + readableClassName + "}" ) ; } } else if ( readableClassName . endsWith ( "]" ) ) { throw new IllegalArgumentException ( "qualifiedName was invalid {" + readableClassName + "}" ) ; } return readableClassName ; }
|
Given a JVM Qualified Name produce a readable classname
|
38,713
|
protected List < Class < ? extends Annotation > > determineQualifiers ( Annotation bindingAnnotation , Annotation ... allAnnotations ) { List < Class < ? extends Annotation > > result = new ArrayList < Class < ? extends Annotation > > ( ) ; Class < ? extends Annotation > bindingAnnotationType = bindingAnnotation . annotationType ( ) ; if ( bindingAnnotationType . getAnnotation ( BindingScope . class ) != null ) { result . add ( bindingAnnotationType ) ; } for ( Annotation next : bindingAnnotation . annotationType ( ) . getAnnotations ( ) ) { Class < ? extends Annotation > nextType = next . annotationType ( ) ; if ( nextType . getAnnotation ( BindingScope . class ) != null ) { result . add ( nextType ) ; } } for ( Annotation next : allAnnotations ) { Class < ? extends Annotation > nextType = next . annotationType ( ) ; if ( nextType . getAnnotation ( BindingScope . class ) != null ) { result . add ( nextType ) ; } } if ( result . isEmpty ( ) ) { result . add ( DefaultBinding . class ) ; } return result ; }
|
Returns the qualifiers for this method setting the Default qualifier if none are found Qualifiers can be either explicitly applied to the method or implicit on account of being found in the annotation itself ( for example
|
38,714
|
static void validateValueUniquenessInScope ( String qualifiedName , List < TypeElement > nestedElements ) { Set < String > names = new LinkedHashSet < > ( ) ; for ( TypeElement nestedElement : nestedElements ) { if ( nestedElement instanceof EnumElement ) { EnumElement enumElement = ( EnumElement ) nestedElement ; for ( EnumConstantElement constant : enumElement . constants ( ) ) { String name = constant . name ( ) ; if ( ! names . add ( name ) ) { throw new IllegalStateException ( "Duplicate enum constant " + name + " in scope " + qualifiedName ) ; } } } } }
|
Though not mentioned in the spec enum names use C ++ scoping rules meaning that enum constants are siblings of their declaring element not children of it .
|
38,715
|
static boolean isValidTag ( int value ) { return ( value >= MIN_TAG_VALUE && value < RESERVED_TAG_VALUE_START ) || ( value > RESERVED_TAG_VALUE_END && value <= MAX_TAG_VALUE ) ; }
|
True if the supplied value is in the valid tag range and not reserved .
|
38,716
|
public static OptionElement findByName ( List < OptionElement > options , String name ) { checkNotNull ( options , "options" ) ; checkNotNull ( name , "name" ) ; OptionElement found = null ; for ( OptionElement option : options ) { if ( option . name ( ) . equals ( name ) ) { if ( found != null ) { throw new IllegalStateException ( "Multiple options match name: " + name ) ; } found = option ; } } return found ; }
|
Return the option with the specified name from the supplied list or null .
|
38,717
|
private OptionKindAndValue readKindAndValue ( ) { char peeked = peekChar ( ) ; switch ( peeked ) { case '{' : return OptionKindAndValue . of ( OptionElement . Kind . MAP , readMap ( '{' , '}' , ':' ) ) ; case '[' : return OptionKindAndValue . of ( OptionElement . Kind . LIST , readList ( ) ) ; case '"' : return OptionKindAndValue . of ( OptionElement . Kind . STRING , readString ( ) ) ; default : if ( Character . isDigit ( peeked ) || peeked == '-' ) { return OptionKindAndValue . of ( OptionElement . Kind . NUMBER , readWord ( ) ) ; } String word = readWord ( ) ; switch ( word ) { case "true" : return OptionKindAndValue . of ( OptionElement . Kind . BOOLEAN , "true" ) ; case "false" : return OptionKindAndValue . of ( OptionElement . Kind . BOOLEAN , "false" ) ; default : return OptionKindAndValue . of ( OptionElement . Kind . ENUM , word ) ; } } }
|
Reads a value that can be a map list string number boolean or enum .
|
38,718
|
private void addToList ( List < Object > list , Object value ) { if ( value instanceof List ) { list . addAll ( ( List ) value ) ; } else { list . add ( value ) ; } }
|
Adds an object or objects to a List .
|
38,719
|
private DataType readDataType ( ) { String name = readWord ( ) ; switch ( name ) { case "map" : if ( readChar ( ) != '<' ) throw unexpected ( "expected '<'" ) ; DataType keyType = readDataType ( ) ; if ( readChar ( ) != ',' ) throw unexpected ( "expected ','" ) ; DataType valueType = readDataType ( ) ; if ( readChar ( ) != '>' ) throw unexpected ( "expected '>'" ) ; return MapType . create ( keyType , valueType ) ; case "any" : return ScalarType . ANY ; case "bool" : return ScalarType . BOOL ; case "bytes" : return ScalarType . BYTES ; case "double" : return ScalarType . DOUBLE ; case "float" : return ScalarType . FLOAT ; case "fixed32" : return ScalarType . FIXED32 ; case "fixed64" : return ScalarType . FIXED64 ; case "int32" : return ScalarType . INT32 ; case "int64" : return ScalarType . INT64 ; case "sfixed32" : return ScalarType . SFIXED32 ; case "sfixed64" : return ScalarType . SFIXED64 ; case "sint32" : return ScalarType . SINT32 ; case "sint64" : return ScalarType . SINT64 ; case "string" : return ScalarType . STRING ; case "uint32" : return ScalarType . UINT32 ; case "uint64" : return ScalarType . UINT64 ; default : return NamedType . create ( name ) ; } }
|
Reads a scalar map or type name .
|
38,720
|
private int readInt ( ) { String tag = readWord ( ) ; try { int radix = 10 ; if ( tag . startsWith ( "0x" ) || tag . startsWith ( "0X" ) ) { tag = tag . substring ( "0x" . length ( ) ) ; radix = 16 ; } return Integer . valueOf ( tag , radix ) ; } catch ( Exception e ) { throw unexpected ( "expected an integer but was " + tag ) ; } }
|
Reads an integer and returns it .
|
38,721
|
public JmxMetricReporter init ( ConfigurationProperties configurationProperties , MetricRegistry metricRegistry ) { if ( configurationProperties . isJmxEnabled ( ) ) { jmxReporter = JmxReporter . forRegistry ( metricRegistry ) . inDomain ( MetricRegistry . name ( getClass ( ) , configurationProperties . getUniqueName ( ) ) ) . build ( ) ; } if ( configurationProperties . isJmxAutoStart ( ) ) { start ( ) ; } return this ; }
|
The JMX Reporter is activated only if the jmxEnabled property is set . If the jmxAutoStart property is enabled the JMX Reporter will start automatically .
|
38,722
|
public Slf4jMetricReporter init ( ConfigurationProperties configurationProperties , MetricRegistry metricRegistry ) { metricLogReporterMillis = configurationProperties . getMetricLogReporterMillis ( ) ; if ( metricLogReporterMillis > 0 ) { this . slf4jReporter = Slf4jReporter . forRegistry ( metricRegistry ) . outputTo ( LOGGER ) . build ( ) ; } return this ; }
|
Create a Log Reporter and activate it if the metricLogReporterMillis property is greater than zero .
|
38,723
|
public void close ( ) { long endNanos = System . nanoTime ( ) ; long durationNanos = endNanos - startNanos ; connectionPoolCallback . releaseConnection ( durationNanos ) ; }
|
Calculates the connection lease nanos and propagates it to the connection pool callback .
|
38,724
|
public static < T > T lookup ( String name ) { InitialContext initialContext = initialContext ( ) ; try { @ SuppressWarnings ( "unchecked" ) T object = ( T ) initialContext . lookup ( name ) ; if ( object == null ) { throw new NameNotFoundException ( name + " was found but is null" ) ; } return object ; } catch ( NameNotFoundException e ) { throw new IllegalArgumentException ( name + " was not found in JNDI" , e ) ; } catch ( NamingException e ) { throw new IllegalArgumentException ( "JNDI lookup failed" , e ) ; } finally { closeContext ( initialContext ) ; } }
|
Lookup object in JNDI
|
38,725
|
public ConnectionDecoratorFactory resolve ( ) { int loadingIndex = Integer . MIN_VALUE ; ConnectionDecoratorFactory connectionDecoratorFactory = null ; Iterator < ConnectionDecoratorFactoryService > connectionDecoratorFactoryServiceIterator = serviceLoader . iterator ( ) ; while ( connectionDecoratorFactoryServiceIterator . hasNext ( ) ) { try { ConnectionDecoratorFactoryService connectionDecoratorFactoryService = connectionDecoratorFactoryServiceIterator . next ( ) ; int currentLoadingIndex = connectionDecoratorFactoryService . loadingIndex ( ) ; if ( currentLoadingIndex > loadingIndex ) { ConnectionDecoratorFactory currentConnectionDecoratorFactory = connectionDecoratorFactoryService . load ( ) ; if ( currentConnectionDecoratorFactory != null ) { connectionDecoratorFactory = currentConnectionDecoratorFactory ; loadingIndex = currentLoadingIndex ; } } } catch ( LinkageError e ) { LOGGER . info ( "Couldn't load ConnectionDecoratorFactoryService on the current JVM" , e ) ; } } if ( connectionDecoratorFactory != null ) { return connectionDecoratorFactory ; } throw new IllegalStateException ( "No ConnectionDecoratorFactory could be loaded!" ) ; }
|
Resolve ConnectionDecoratorFactory from the Service Provider Interface configuration
|
38,726
|
public Connection newInstance ( Connection target , ConnectionPoolCallback connectionPoolCallback ) { return proxyConnection ( target , new ConnectionCallback ( connectionPoolCallback ) ) ; }
|
Creates a ConnectionProxy for the specified target and attaching the following callback .
|
38,727
|
public static ClassLoader getClassLoader ( ) { ClassLoader classLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ; return ( classLoader != null ) ? classLoader : ClassLoaderUtils . class . getClassLoader ( ) ; }
|
Load the available ClassLoader
|
38,728
|
@ SuppressWarnings ( "unchecked" ) public static < T > Class < T > loadClass ( String className ) throws ClassNotFoundException { return ( Class < T > ) getClassLoader ( ) . loadClass ( className ) ; }
|
Load the Class denoted by the given string representation
|
38,729
|
@ SuppressWarnings ( "unchecked" ) public static boolean findClass ( String className ) { try { return getClassLoader ( ) . loadClass ( className ) != null ; } catch ( ClassNotFoundException e ) { return false ; } catch ( NoClassDefFoundError e ) { return false ; } }
|
Find if Class denoted by the given string representation is loadable
|
38,730
|
public MetricsFactory resolve ( ) { for ( MetricsFactoryService metricsFactoryService : serviceLoader ) { MetricsFactory metricsFactory = metricsFactoryService . load ( ) ; if ( metricsFactory != null ) { return metricsFactory ; } } throw new IllegalStateException ( "No MetricsFactory could be loaded!" ) ; }
|
Resolve MetricsFactory from the Service Provider Interface configuration
|
38,731
|
private < T extends DataSource > T applyDataSourceProperties ( T dataSource ) { for ( Map . Entry < Object , Object > entry : properties . entrySet ( ) ) { String key = entry . getKey ( ) . toString ( ) ; String value = entry . getValue ( ) . toString ( ) ; String propertyKey = PropertyKey . DATA_SOURCE_PROPERTY . getKey ( ) ; if ( key . startsWith ( propertyKey ) ) { String dataSourceProperty = key . substring ( propertyKey . length ( ) ) ; ReflectionUtils . invokeSetter ( dataSource , dataSourceProperty , value ) ; } } return dataSource ; }
|
Apply DataSource specific properties
|
38,732
|
private < T > T instantiateClass ( PropertyKey propertyKey ) { T object = null ; String property = properties . getProperty ( propertyKey . getKey ( ) ) ; if ( property != null ) { try { Class < T > clazz = ClassLoaderUtils . loadClass ( property ) ; LOGGER . debug ( "Instantiate {}" , clazz ) ; object = clazz . newInstance ( ) ; } catch ( ClassNotFoundException e ) { LOGGER . error ( "Couldn't load the " + property + " class given by the " + propertyKey + " property" , e ) ; } catch ( InstantiationException e ) { LOGGER . error ( "Couldn't instantiate the " + property + " class given by the " + propertyKey + " property" , e ) ; } catch ( IllegalAccessException e ) { LOGGER . error ( "Couldn't access the " + property + " class given by the " + propertyKey + " property" , e ) ; } } return object ; }
|
Instantiate class associated to the given property key
|
38,733
|
private Integer integerProperty ( PropertyKey propertyKey ) { Integer value = null ; String property = properties . getProperty ( propertyKey . getKey ( ) ) ; if ( property != null ) { value = Integer . valueOf ( property ) ; } return value ; }
|
Get Integer property value
|
38,734
|
private Long longProperty ( PropertyKey propertyKey ) { Long value = null ; String property = properties . getProperty ( propertyKey . getKey ( ) ) ; if ( property != null ) { value = Long . valueOf ( property ) ; } return value ; }
|
Get Long property value
|
38,735
|
private Boolean booleanProperty ( PropertyKey propertyKey ) { Boolean value = null ; String property = properties . getProperty ( propertyKey . getKey ( ) ) ; if ( property != null ) { value = Boolean . valueOf ( property ) ; } return value ; }
|
Get Boolean property value
|
38,736
|
@ SuppressWarnings ( "unchecked" ) private < T > T jndiLookup ( PropertyKey propertyKey ) { String property = properties . getProperty ( propertyKey . getKey ( ) ) ; if ( property != null ) { return isJndiLazyLookup ( ) ? ( T ) LazyJndiResolver . newInstance ( property , DataSource . class ) : ( T ) JndiUtils . lookup ( property ) ; } return null ; }
|
Lookup object from JNDI
|
38,737
|
private Connection getConnection ( ConnectionRequestContext context ) throws SQLException { concurrentConnectionRequestCountHistogram . update ( concurrentConnectionRequestCount . incrementAndGet ( ) ) ; long startNanos = System . nanoTime ( ) ; try { Connection connection = null ; if ( ! connectionAcquiringStrategies . isEmpty ( ) ) { for ( ConnectionAcquiringStrategy strategy : connectionAcquiringStrategies ) { try { connection = strategy . getConnection ( context ) ; break ; } catch ( AcquireTimeoutException e ) { LOGGER . warn ( "Couldn't retrieve connection from strategy {} with context {}" , strategy , context ) ; } } } else { connection = poolAdapter . getConnection ( context ) ; } if ( connection != null ) { return connectionProxyFactory . newInstance ( connection , this ) ; } else { throw new CantAcquireConnectionException ( "Couldn't acquire connection for current strategies: " + connectionAcquiringStrategies ) ; } } finally { long endNanos = System . nanoTime ( ) ; long acquireDurationMillis = TimeUnit . NANOSECONDS . toMillis ( endNanos - startNanos ) ; connectionAcquireTotalTimer . update ( acquireDurationMillis , TimeUnit . MILLISECONDS ) ; concurrentConnectionRequestCountHistogram . update ( concurrentConnectionRequestCount . decrementAndGet ( ) ) ; if ( acquireDurationMillis > connectionAcquireTimeThresholdMillis ) { eventPublisher . publish ( new ConnectionAcquireTimeThresholdExceededEvent ( uniqueName , connectionAcquireTimeThresholdMillis , acquireDurationMillis ) ) ; LOGGER . info ( "Connection acquired in {} millis, while threshold is set to {} in {} FlexyPoolDataSource" , acquireDurationMillis , connectionAcquireTimeThresholdMillis , uniqueName ) ; } } }
|
Try to obtain a connection by going through all available strategies
|
38,738
|
protected boolean incrementPoolSize ( int expectingMaxSize ) { Integer maxSize = null ; long currentOverflowPoolSize ; try { lock . lockInterruptibly ( ) ; int currentMaxSize = poolAdapter . getMaxPoolSize ( ) ; boolean incrementMaxPoolSize = currentMaxSize < maxOverflowPoolSize ; if ( currentMaxSize > expectingMaxSize ) { LOGGER . info ( "Pool size changed by other thread, expected {} and actual value {}" , expectingMaxSize , currentMaxSize ) ; return incrementMaxPoolSize ; } if ( ! incrementMaxPoolSize ) { return false ; } currentOverflowPoolSize = overflowPoolSize . incrementAndGet ( ) ; poolAdapter . setMaxPoolSize ( ++ currentMaxSize ) ; maxSize = currentMaxSize ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; return false ; } finally { lock . unlock ( ) ; } LOGGER . info ( "Pool size changed from previous value {} to {}" , expectingMaxSize , maxSize ) ; maxPoolSizeHistogram . update ( maxSize ) ; overflowPoolSizeHistogram . update ( currentOverflowPoolSize ) ; return true ; }
|
Attempt to increment the pool size . If the maxSize changes it skips the incrementing process .
|
38,739
|
public static < T > T getFieldValue ( Object target , String fieldName ) { try { Field field = target . getClass ( ) . getDeclaredField ( fieldName ) ; field . setAccessible ( true ) ; @ SuppressWarnings ( "unchecked" ) T returnValue = ( T ) field . get ( target ) ; return returnValue ; } catch ( NoSuchFieldException e ) { throw handleException ( fieldName , e ) ; } catch ( IllegalAccessException e ) { throw handleException ( fieldName , e ) ; } }
|
Get target object field value
|
38,740
|
public static void setFieldValue ( Object target , String fieldName , Object value ) { try { Field field = target . getClass ( ) . getDeclaredField ( fieldName ) ; field . setAccessible ( true ) ; field . set ( target , value ) ; } catch ( NoSuchFieldException e ) { throw handleException ( fieldName , e ) ; } catch ( IllegalAccessException e ) { throw handleException ( fieldName , e ) ; } }
|
Set target object field value
|
38,741
|
public static Method getMethod ( Object target , String methodName , Class ... parameterTypes ) { try { return target . getClass ( ) . getMethod ( methodName , parameterTypes ) ; } catch ( NoSuchMethodException e ) { throw handleException ( methodName , e ) ; } }
|
Get target method
|
38,742
|
public static boolean hasMethod ( Class < ? > targetClass , String methodName , Class ... parameterTypes ) { try { targetClass . getMethod ( methodName , parameterTypes ) ; return true ; } catch ( NoSuchMethodException e ) { return false ; } }
|
Check if target class has the given method
|
38,743
|
public static Method getSetter ( Object target , String property , Class < ? > parameterType ) { String setterMethodName = SETTER_PREFIX + property . substring ( 0 , 1 ) . toUpperCase ( ) + property . substring ( 1 ) ; return getMethod ( target , setterMethodName , parameterType ) ; }
|
Get setter method
|
38,744
|
public static < T > T invoke ( Object target , Method method , Object ... parameters ) { try { @ SuppressWarnings ( "unchecked" ) T returnValue = ( T ) method . invoke ( target , parameters ) ; return returnValue ; } catch ( InvocationTargetException e ) { throw handleException ( method . getName ( ) , e ) ; } catch ( IllegalAccessException e ) { throw handleException ( method . getName ( ) , e ) ; } }
|
Invoke target method
|
38,745
|
public static void invokeSetter ( Object target , String property , Object parameter ) { Method setter = getSetter ( target , property , parameter . getClass ( ) ) ; try { setter . invoke ( target , parameter ) ; } catch ( IllegalAccessException e ) { throw handleException ( setter . getName ( ) , e ) ; } catch ( InvocationTargetException e ) { throw handleException ( setter . getName ( ) , e ) ; } }
|
Invoke setter method with the given parameter
|
38,746
|
public Object invoke ( Object proxy , Method method , Object [ ] args ) throws Throwable { if ( target == null ) { target = JndiUtils . lookup ( name ) ; } return method . invoke ( target , args ) ; }
|
Resolves the JNDI object upon invoking any method on the associated Proxy
|
38,747
|
@ SuppressWarnings ( "unchecked" ) public static < T > T newInstance ( String name , Class < ? > objectType ) { return ( T ) Proxy . newProxyInstance ( ClassLoaderUtils . getClassLoader ( ) , new Class [ ] { objectType } , new LazyJndiResolver ( name ) ) ; }
|
Creates a new Proxy instance
|
38,748
|
public static URI create ( Path pathToVault , String ... pathComponentsInsideVault ) { try { return new URI ( URI_SCHEME , pathToVault . toUri ( ) . toString ( ) , "/" + String . join ( "/" , pathComponentsInsideVault ) , null , null ) ; } catch ( URISyntaxException e ) { throw new IllegalArgumentException ( "Can not create URI from given input" , e ) ; } }
|
Constructs a CryptoFileSystem URI by using the given absolute path to a vault and constructing a path inside the vault from components .
|
38,749
|
public static boolean containsVault ( Path pathToVault , String masterkeyFilename ) { Path masterKeyPath = pathToVault . resolve ( masterkeyFilename ) ; Path dataDirPath = pathToVault . resolve ( Constants . DATA_DIR_NAME ) ; return Files . isReadable ( masterKeyPath ) && Files . isDirectory ( dataDirPath ) ; }
|
Checks if the folder represented by the given path exists and contains a valid vault structure .
|
38,750
|
public TwoPhaseMove prepareMove ( Path src , Path dst ) throws FileAlreadyExistsException { return new TwoPhaseMove ( src , dst ) ; }
|
Prepares to update any open file references during a move operation . MUST be invoked using a try - with - resource statement and committed after the physical file move succeeded .
|
38,751
|
public synchronized FileChannel newFileChannel ( EffectiveOpenOptions options ) throws IOException { Path path = currentFilePath . get ( ) ; if ( options . truncateExisting ( ) ) { chunkCache . invalidateAll ( ) ; } FileChannel ciphertextFileChannel = null ; CleartextFileChannel cleartextFileChannel = null ; try { ciphertextFileChannel = path . getFileSystem ( ) . provider ( ) . newFileChannel ( path , options . createOpenOptionsForEncryptedFile ( ) ) ; initFileSize ( ciphertextFileChannel ) ; ChannelComponent channelComponent = component . newChannelComponent ( ) . ciphertextChannel ( ciphertextFileChannel ) . openOptions ( options ) . onClose ( this :: channelClosed ) . build ( ) ; cleartextFileChannel = channelComponent . channel ( ) ; } finally { if ( cleartextFileChannel == null ) { closeQuietly ( ciphertextFileChannel ) ; if ( openChannels . isEmpty ( ) ) { close ( ) ; } } } assert cleartextFileChannel != null ; openChannels . put ( cleartextFileChannel , ciphertextFileChannel ) ; chunkIO . registerChannel ( ciphertextFileChannel , options . writable ( ) ) ; return cleartextFileChannel ; }
|
Creates a new file channel with the given open options .
|
38,752
|
public Path resolveConflictsIfNecessary ( Path ciphertextPath , String dirId ) throws IOException { String ciphertextFileName = ciphertextPath . getFileName ( ) . toString ( ) ; String basename = StringUtils . removeEnd ( ciphertextFileName , LONG_NAME_FILE_EXT ) ; Matcher m = CIPHERTEXT_FILENAME_PATTERN . matcher ( basename ) ; if ( ! m . matches ( ) && m . find ( 0 ) ) { return resolveConflict ( ciphertextPath , m . group ( 0 ) , dirId ) ; } else { return ciphertextPath ; } }
|
Checks if the name of the file represented by the given ciphertextPath is a valid ciphertext name without any additional chars . If any unexpected chars are found on the name but it still contains an authentic ciphertext it is considered a conflicting file . Conflicting files will be given a new name . The caller must use the path returned by this function after invoking it as the given ciphertextPath might be no longer valid .
|
38,753
|
private Path resolveConflict ( Path conflictingPath , String ciphertextFileName , String dirId ) throws IOException { String conflictingFileName = conflictingPath . getFileName ( ) . toString ( ) ; Preconditions . checkArgument ( conflictingFileName . contains ( ciphertextFileName ) , "%s does not contain %s" , conflictingPath , ciphertextFileName ) ; Path parent = conflictingPath . getParent ( ) ; String inflatedFileName ; Path canonicalPath ; if ( longFileNameProvider . isDeflated ( conflictingFileName ) ) { String deflatedName = ciphertextFileName + LONG_NAME_FILE_EXT ; inflatedFileName = longFileNameProvider . inflate ( deflatedName ) ; canonicalPath = parent . resolve ( deflatedName ) ; } else { inflatedFileName = ciphertextFileName ; canonicalPath = parent . resolve ( ciphertextFileName ) ; } CiphertextFileType type = CiphertextFileType . forFileName ( inflatedFileName ) ; assert inflatedFileName . startsWith ( type . getPrefix ( ) ) ; String ciphertext = inflatedFileName . substring ( type . getPrefix ( ) . length ( ) ) ; if ( CiphertextFileType . DIRECTORY . equals ( type ) && resolveDirectoryConflictTrivially ( canonicalPath , conflictingPath ) ) { return canonicalPath ; } else { return renameConflictingFile ( canonicalPath , conflictingPath , ciphertext , dirId , type . getPrefix ( ) ) ; } }
|
Resolves a conflict .
|
38,754
|
private Path renameConflictingFile ( Path canonicalPath , Path conflictingPath , String ciphertext , String dirId , String dirPrefix ) throws IOException { try { String cleartext = cryptor . fileNameCryptor ( ) . decryptFilename ( ciphertext , dirId . getBytes ( StandardCharsets . UTF_8 ) ) ; Path alternativePath = canonicalPath ; for ( int i = 1 ; Files . exists ( alternativePath ) ; i ++ ) { String alternativeCleartext = cleartext + " (Conflict " + i + ")" ; String alternativeCiphertext = cryptor . fileNameCryptor ( ) . encryptFilename ( alternativeCleartext , dirId . getBytes ( StandardCharsets . UTF_8 ) ) ; String alternativeCiphertextFileName = dirPrefix + alternativeCiphertext ; if ( alternativeCiphertextFileName . length ( ) > SHORT_NAMES_MAX_LENGTH ) { alternativeCiphertextFileName = longFileNameProvider . deflate ( alternativeCiphertextFileName ) ; } alternativePath = canonicalPath . resolveSibling ( alternativeCiphertextFileName ) ; } LOG . info ( "Moving conflicting file {} to {}" , conflictingPath , alternativePath ) ; return Files . move ( conflictingPath , alternativePath , StandardCopyOption . ATOMIC_MOVE ) ; } catch ( AuthenticationFailedException e ) { LOG . info ( "Found valid Base32 string, which is an unauthentic ciphertext: {}" , conflictingPath ) ; return conflictingPath ; } }
|
Resolves a conflict by renaming the conflicting file .
|
38,755
|
private boolean resolveDirectoryConflictTrivially ( Path canonicalPath , Path conflictingPath ) throws IOException { if ( ! Files . exists ( canonicalPath ) ) { Files . move ( conflictingPath , canonicalPath , StandardCopyOption . ATOMIC_MOVE ) ; return true ; } else if ( hasSameDirFileContent ( conflictingPath , canonicalPath ) ) { LOG . info ( "Removing conflicting directory file {} (identical to {})" , conflictingPath , canonicalPath ) ; Files . deleteIfExists ( conflictingPath ) ; return true ; } else { return false ; } }
|
Tries to resolve a conflicting directory file without renaming the file . If successful only the file with the canonical path will exist afterwards .
|
38,756
|
public boolean needsMigration ( Path pathToVault , String masterkeyFilename ) throws IOException { Path masterKeyPath = pathToVault . resolve ( masterkeyFilename ) ; byte [ ] keyFileContents = Files . readAllBytes ( masterKeyPath ) ; KeyFile keyFile = KeyFile . parse ( keyFileContents ) ; return keyFile . getVersion ( ) < Constants . VAULT_VERSION ; }
|
Inspects the vault and checks if it is supported by this library .
|
38,757
|
public void migrate ( Path pathToVault , String masterkeyFilename , CharSequence passphrase ) throws NoApplicableMigratorException , InvalidPassphraseException , IOException { Path masterKeyPath = pathToVault . resolve ( masterkeyFilename ) ; byte [ ] keyFileContents = Files . readAllBytes ( masterKeyPath ) ; KeyFile keyFile = KeyFile . parse ( keyFileContents ) ; try { Migrator migrator = findApplicableMigrator ( keyFile . getVersion ( ) ) . orElseThrow ( NoApplicableMigratorException :: new ) ; migrator . migrate ( pathToVault , masterkeyFilename , passphrase ) ; } catch ( UnsupportedVaultFormatException e ) { throw new IllegalStateException ( "Vault version checked beforehand but not supported by migrator." ) ; } }
|
Performs the actual migration . This task may take a while and this method will block .
|
38,758
|
public com . google . api . ads . adwords . axis . v201809 . cm . Image getCollapsedImage ( ) { return collapsedImage ; }
|
Gets the collapsedImage value for this ShowcaseAd .
|
38,759
|
public com . google . api . ads . adwords . axis . v201809 . cm . Image getExpandedImage ( ) { return expandedImage ; }
|
Gets the expandedImage value for this ShowcaseAd .
|
38,760
|
public static org . apache . axis . encoding . Serializer getSerializer ( java . lang . String mechType , java . lang . Class _javaType , javax . xml . namespace . QName _xmlType ) { return new org . apache . axis . encoding . ser . BeanSerializer ( _javaType , _xmlType , typeDesc ) ; }
|
Get Custom Serializer
|
38,761
|
public static org . apache . axis . encoding . Deserializer getDeserializer ( java . lang . String mechType , java . lang . Class _javaType , javax . xml . namespace . QName _xmlType ) { return new org . apache . axis . encoding . ser . BeanDeserializer ( _javaType , _xmlType , typeDesc ) ; }
|
Get Custom Deserializer
|
38,762
|
public void setPremiumFeature ( com . google . api . ads . admanager . axis . v201902 . PremiumFeature premiumFeature ) { this . premiumFeature = premiumFeature ; }
|
Sets the premiumFeature value for this PremiumRateValue .
|
38,763
|
public com . google . api . ads . admanager . axis . v201902 . RateType getRateType ( ) { return rateType ; }
|
Gets the rateType value for this PremiumRateValue .
|
38,764
|
public void setRateType ( com . google . api . ads . admanager . axis . v201902 . RateType rateType ) { this . rateType = rateType ; }
|
Sets the rateType value for this PremiumRateValue .
|
38,765
|
public void setAdjustmentType ( com . google . api . ads . admanager . axis . v201902 . PremiumAdjustmentType adjustmentType ) { this . adjustmentType = adjustmentType ; }
|
Sets the adjustmentType value for this PremiumRateValue .
|
38,766
|
public com . google . api . ads . adwords . axis . v201809 . cm . Criterion getCriterion ( ) { return criterion ; }
|
Gets the criterion value for this AdGroupBidModifier .
|
38,767
|
public com . google . api . ads . adwords . axis . v201809 . cm . BidModifierSource getBidModifierSource ( ) { return bidModifierSource ; }
|
Gets the bidModifierSource value for this AdGroupBidModifier .
|
38,768
|
public com . google . api . ads . adwords . axis . v201809 . cm . UrlList getSitelinkFinalUrls ( ) { return sitelinkFinalUrls ; }
|
Gets the sitelinkFinalUrls value for this SitelinkFeedItem .
|
38,769
|
public com . google . api . ads . adwords . axis . v201809 . cm . UrlList getSitelinkFinalMobileUrls ( ) { return sitelinkFinalMobileUrls ; }
|
Gets the sitelinkFinalMobileUrls value for this SitelinkFeedItem .
|
38,770
|
public com . google . api . ads . adwords . axis . v201809 . cm . CustomParameters getSitelinkUrlCustomParameters ( ) { return sitelinkUrlCustomParameters ; }
|
Gets the sitelinkUrlCustomParameters value for this SitelinkFeedItem .
|
38,771
|
public com . google . api . ads . admanager . axis . v201902 . Date getStartDate ( ) { return startDate ; }
|
Gets the startDate value for this DateRange .
|
38,772
|
public void setEndDate ( com . google . api . ads . admanager . axis . v201902 . Date endDate ) { this . endDate = endDate ; }
|
Sets the endDate value for this DateRange .
|
38,773
|
private static Long createBudget ( AdWordsServicesInterface adWordsServices , AdWordsSession session ) throws RemoteException , ApiException { BudgetServiceInterface budgetService = adWordsServices . get ( session , BudgetServiceInterface . class ) ; Budget budget = new Budget ( ) ; budget . setName ( "Interplanetary Cruise App Budget #" + System . currentTimeMillis ( ) ) ; Money budgetAmount = new Money ( ) ; budgetAmount . setMicroAmount ( 50000000L ) ; budget . setAmount ( budgetAmount ) ; budget . setDeliveryMethod ( BudgetBudgetDeliveryMethod . STANDARD ) ; budget . setIsExplicitlyShared ( false ) ; BudgetOperation budgetOperation = new BudgetOperation ( ) ; budgetOperation . setOperand ( budget ) ; budgetOperation . setOperator ( Operator . ADD ) ; Budget addedBudget = budgetService . mutate ( new BudgetOperation [ ] { budgetOperation } ) . getValue ( 0 ) ; System . out . printf ( "Budget with name '%s' and ID %d was created.%n" , addedBudget . getName ( ) , addedBudget . getBudgetId ( ) ) ; return addedBudget . getBudgetId ( ) ; }
|
Creates the budget for the campaign .
|
38,774
|
private static void setCampaignTargetingCriteria ( Campaign campaign , AdWordsServicesInterface adWordsServices , AdWordsSession session ) throws ApiException , RemoteException { CampaignCriterionServiceInterface campaignCriterionService = adWordsServices . get ( session , CampaignCriterionServiceInterface . class ) ; Location california = new Location ( ) ; california . setId ( 21137L ) ; Location mexico = new Location ( ) ; mexico . setId ( 2484L ) ; Language english = new Language ( ) ; english . setId ( 1000L ) ; Language spanish = new Language ( ) ; spanish . setId ( 1003L ) ; List < Criterion > criteria = new ArrayList < > ( Arrays . asList ( california , mexico , english , spanish ) ) ; List < CampaignCriterionOperation > operations = new ArrayList < > ( ) ; for ( Criterion criterion : criteria ) { CampaignCriterionOperation operation = new CampaignCriterionOperation ( ) ; CampaignCriterion campaignCriterion = new CampaignCriterion ( ) ; campaignCriterion . setCampaignId ( campaign . getId ( ) ) ; campaignCriterion . setCriterion ( criterion ) ; operation . setOperand ( campaignCriterion ) ; operation . setOperator ( Operator . ADD ) ; operations . add ( operation ) ; } CampaignCriterionReturnValue returnValue = campaignCriterionService . mutate ( operations . toArray ( new CampaignCriterionOperation [ operations . size ( ) ] ) ) ; if ( returnValue != null && returnValue . getValue ( ) != null ) { for ( CampaignCriterion campaignCriterion : returnValue . getValue ( ) ) { System . out . printf ( "Campaign criteria of type '%s' and ID %d was added.%n" , campaignCriterion . getCriterion ( ) . getCriterionType ( ) , campaignCriterion . getCriterion ( ) . getId ( ) ) ; } } }
|
Sets the campaign s targeting criteria .
|
38,775
|
public V callWithRetries ( ) throws ApiInvocationException { V result = null ; Throwable lastError = null ; for ( int kthAttempt = 1 ; retryStrategy . canDoThisAttempt ( kthAttempt ) ; ++ kthAttempt ) { long waitForMillis = retryStrategy . calcWaitTimeBeforeCall ( clientCustomerId , kthAttempt , lastError ) ; if ( waitForMillis > 0 ) { logger . info ( "Thread \"{}\" is sleeping for {} millis." , Thread . currentThread ( ) . getName ( ) , waitForMillis ) ; try { Thread . sleep ( waitForMillis ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; throw new ApiInvocationException ( "InterruptedException occurs while waiting to " + actionDescription , e . getCause ( ) ) ; } } try { lastError = null ; result = callable . call ( ) ; break ; } catch ( IllegalAccessException e ) { throw new RateLimiterException ( "Illegal access to invoke: " + actionDescription , e ) ; } catch ( InvocationTargetException e ) { lastError = e . getCause ( ) ; } catch ( Exception e ) { lastError = e ; } if ( retryStrategy . shouldRetryOnError ( clientCustomerId , lastError ) ) { logger . error ( "Failed to call {} at exception check, attempt #{}." , actionDescription , kthAttempt ) ; } else { logger . error ( "Failed to call {} at exception check: encountered non-retriable {}, skip retry!" , actionDescription , lastError . getClass ( ) . getName ( ) ) ; throw new ApiInvocationException ( "Encountered non-retriable exception." , lastError ) ; } } if ( result == null ) { String msg = "Failed to " + actionDescription + " after all retries." ; logger . error ( msg , lastError ) ; throw new ApiInvocationException ( msg , lastError ) ; } return result ; }
|
Invoke the AdWords API call with retry logic .
|
38,776
|
public com . google . api . ads . adwords . axis . v201809 . o . AttributeType getKey ( ) { return key ; }
|
Gets the key value for this Type_AttributeMapEntry .
|
38,777
|
public com . google . api . ads . adwords . axis . v201809 . cm . AdvertisingChannelType getAdvertisingChannelType ( ) { return advertisingChannelType ; }
|
Gets the advertisingChannelType value for this CampaignBidModifier .
|
38,778
|
public com . google . api . ads . admanager . axis . v201808 . DeviceCapabilityTargeting getDeviceCapabilityTargeting ( ) { return deviceCapabilityTargeting ; }
|
Gets the deviceCapabilityTargeting value for this TechnologyTargeting .
|
38,779
|
public com . google . api . ads . admanager . axis . v201808 . MobileDeviceTargeting getMobileDeviceTargeting ( ) { return mobileDeviceTargeting ; }
|
Gets the mobileDeviceTargeting value for this TechnologyTargeting .
|
38,780
|
public com . google . api . ads . admanager . axis . v201805 . DaiAuthenticationKeyType getKeyType ( ) { return keyType ; }
|
Gets the keyType value for this DaiAuthenticationKey .
|
38,781
|
public void setKeyType ( com . google . api . ads . admanager . axis . v201805 . DaiAuthenticationKeyType keyType ) { this . keyType = keyType ; }
|
Sets the keyType value for this DaiAuthenticationKey .
|
38,782
|
public com . google . api . ads . admanager . axis . v201805 . DateTime getStartDateTime ( ) { return startDateTime ; }
|
Gets the startDateTime value for this ProposalLineItem .
|
38,783
|
public void setRoadblockingType ( com . google . api . ads . admanager . axis . v201805 . RoadblockingType roadblockingType ) { this . roadblockingType = roadblockingType ; }
|
Sets the roadblockingType value for this ProposalLineItem .
|
38,784
|
public com . google . api . ads . admanager . axis . v201805 . CreativeRotationType getCreativeRotationType ( ) { return creativeRotationType ; }
|
Gets the creativeRotationType value for this ProposalLineItem .
|
38,785
|
public void setFrequencyCaps ( com . google . api . ads . admanager . axis . v201805 . FrequencyCap [ ] frequencyCaps ) { this . frequencyCaps = frequencyCaps ; }
|
Sets the frequencyCaps value for this ProposalLineItem .
|
38,786
|
public com . google . api . ads . admanager . axis . v201805 . Targeting getTargeting ( ) { return targeting ; }
|
Gets the targeting value for this ProposalLineItem .
|
38,787
|
public void setTargeting ( com . google . api . ads . admanager . axis . v201805 . Targeting targeting ) { this . targeting = targeting ; }
|
Sets the targeting value for this ProposalLineItem .
|
38,788
|
public com . google . api . ads . admanager . axis . v201805 . BaseCustomFieldValue [ ] getCustomFieldValues ( ) { return customFieldValues ; }
|
Gets the customFieldValues value for this ProposalLineItem .
|
38,789
|
public com . google . api . ads . admanager . axis . v201805 . ProposalLineItemConstraints getProductConstraints ( ) { return productConstraints ; }
|
Gets the productConstraints value for this ProposalLineItem .
|
38,790
|
public void setProductConstraints ( com . google . api . ads . admanager . axis . v201805 . ProposalLineItemConstraints productConstraints ) { this . productConstraints = productConstraints ; }
|
Sets the productConstraints value for this ProposalLineItem .
|
38,791
|
public void setPremiums ( com . google . api . ads . admanager . axis . v201805 . ProposalLineItemPremium [ ] premiums ) { this . premiums = premiums ; }
|
Sets the premiums value for this ProposalLineItem .
|
38,792
|
public com . google . api . ads . admanager . axis . v201805 . Money getBaseRate ( ) { return baseRate ; }
|
Gets the baseRate value for this ProposalLineItem .
|
38,793
|
public com . google . api . ads . admanager . axis . v201805 . Money getGrossCost ( ) { return grossCost ; }
|
Gets the grossCost value for this ProposalLineItem .
|
38,794
|
public void setGrossCost ( com . google . api . ads . admanager . axis . v201805 . Money grossCost ) { this . grossCost = grossCost ; }
|
Sets the grossCost value for this ProposalLineItem .
|
38,795
|
public com . google . api . ads . admanager . axis . v201805 . BillingCap getBillingCap ( ) { return billingCap ; }
|
Gets the billingCap value for this ProposalLineItem .
|
38,796
|
public com . google . api . ads . admanager . axis . v201805 . DateTime getLastModifiedDateTime ( ) { return lastModifiedDateTime ; }
|
Gets the lastModifiedDateTime value for this ProposalLineItem .
|
38,797
|
public com . google . api . ads . admanager . axis . v201805 . EnvironmentType getEnvironmentType ( ) { return environmentType ; }
|
Gets the environmentType value for this ProposalLineItem .
|
38,798
|
public com . google . api . ads . admanager . axis . v201805 . LinkStatus getLinkStatus ( ) { return linkStatus ; }
|
Gets the linkStatus value for this ProposalLineItem .
|
38,799
|
public com . google . api . ads . admanager . axis . v201805 . ProgrammaticCreativeSource getProgrammaticCreativeSource ( ) { return programmaticCreativeSource ; }
|
Gets the programmaticCreativeSource value for this ProposalLineItem .
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.