signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class TimeNode { /** * Obtain value from list considering specified index and required shifts . * @ param values - possible values * @ param index - index to be considered * @ param shift - shifts that should be applied * @ return int - required value from values list */ @ VisibleForTesting int getValueF...
Preconditions . checkNotNullNorEmpty ( values , "List must not be empty" ) ; if ( index < 0 ) { index = index + values . size ( ) ; shift . incrementAndGet ( ) ; return getValueFromList ( values , index , shift ) ; } if ( index >= values . size ( ) ) { index = index - values . size ( ) ; shift . incrementAndGet ( ) ; r...
public class AstUtil { /** * Parses a string for caller id information . < br > * The caller id string should be in the form * < code > " Some Name " & lt ; 1234 & gt ; < / code > . < br > * This resembles < code > ast _ callerid _ parse < / code > in < code > callerid . c < / code > * but strips any whitespace...
final String [ ] result = new String [ 2 ] ; final int lbPosition ; final int rbPosition ; String name ; String number ; if ( s == null ) { return result ; } lbPosition = s . lastIndexOf ( '<' ) ; rbPosition = s . lastIndexOf ( '>' ) ; // no opening and closing brace ? use value as CallerId name if ( lbPosition < 0 || ...
public class CommerceSubscriptionEntryPersistenceImpl { /** * Returns the first commerce subscription entry in the ordered set where subscriptionStatus = & # 63 ; . * @ param subscriptionStatus the subscription status * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code...
CommerceSubscriptionEntry commerceSubscriptionEntry = fetchBySubscriptionStatus_First ( subscriptionStatus , orderByComparator ) ; if ( commerceSubscriptionEntry != null ) { return commerceSubscriptionEntry ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "sub...
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } * { @ link CmisExtensionType } { @ code > } */ @ XmlElementDecl ( namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/" , name = "extension" , scope = RemovePolicy . class ) public JAXBElement < CmisExtensionType...
return new JAXBElement < CmisExtensionType > ( _GetPropertiesExtension_QNAME , CmisExtensionType . class , RemovePolicy . class , value ) ;
public class BitapPattern { /** * Returns a BitapMatcher preforming a fuzzy search in a subsequence of { @ code sequence } . Search range starts from * { @ code from } ( inclusive ) and ends at { @ code to } ( exclusive ) . Search allows no more than { @ code substitutions } * number of substitutions . Matcher will...
if ( sequence . getAlphabet ( ) . size ( ) != patternMask . length ) throw new IllegalArgumentException ( ) ; return new BitapMatcherImpl ( substitutions + 1 , from , to ) { @ Override public int findNext ( ) { long matchingMask = ( 1L << ( size - 1 ) ) ; int d ; long preMismatchTmp , mismatchTmp ; boolean match = fals...
public class LottieDrawable { /** * Use this to manually set fonts . */ public void setFontAssetDelegate ( @ SuppressWarnings ( "NullableProblems" ) FontAssetDelegate assetDelegate ) { } }
this . fontAssetDelegate = assetDelegate ; if ( fontAssetManager != null ) { fontAssetManager . setDelegate ( assetDelegate ) ; }
public class SemanticAPI { /** * 提交语音 * @ param accessToken 接口调用凭证 * @ param voiceId 语音唯一标识 * @ param lang 语言 , zh _ CN 或 en _ US , 默认中文 * @ param uri 文件格式 只支持mp3,16k , 单声道 , 最大1M * @ return BaseResult * @ since 2.8.22 */ public static BaseResult addvoicetorecofortext ( String accessToken , String voiceId ,...
HttpPost httpPost = new HttpPost ( BASE_URI + "/cgi-bin/media/voice/addvoicetorecofortext" ) ; CloseableHttpClient tempHttpClient = HttpClients . createDefault ( ) ; try { HttpEntity entity = tempHttpClient . execute ( RequestBuilder . get ( ) . setUri ( uri ) . build ( ) ) . getEntity ( ) ; HttpEntity reqEntity = Mult...
public class Streams { /** * Append values to the take of this Stream * < pre > * { @ code * List < String > result = of ( 1,2,3 ) . append ( 100,200,300) * . map ( it - > it + " ! ! " ) * . collect ( CyclopsCollectors . toList ( ) ) ; * assertThat ( result , equalTo ( Arrays . asList ( " 1 ! ! " , " 2 ! ! ...
return appendStream ( stream , Stream . of ( values ) ) ;
public class Pickler { /** * Pickle a single object and write its pickle representation to the output stream . * Normally this is used internally by the pickler , but you can also utilize it from * within custom picklers . This is handy if as part of the custom pickler , you need * to write a couple of normal obj...
recurse ++ ; if ( recurse > MAX_RECURSE_DEPTH ) throw new java . lang . StackOverflowError ( "recursion too deep in Pickler.save (>" + MAX_RECURSE_DEPTH + ")" ) ; // null type ? if ( o == null ) { out . write ( Opcodes . NONE ) ; recurse -- ; return ; } // check the memo table , otherwise simply dispatch Class < ? > t ...
public class PortletRenderResponseContextImpl { /** * / * ( non - Javadoc ) * @ see org . apache . pluto . container . PortletRenderResponseContext # setTitle ( java . lang . String ) */ @ Override public void setTitle ( String title ) { } }
this . checkContextStatus ( ) ; this . servletRequest . setAttribute ( IPortletRenderer . ATTRIBUTE__PORTLET_TITLE , title ) ;
public class bridgetable { /** * Use this API to fetch all the bridgetable resources that are configured on netscaler . */ public static bridgetable [ ] get ( nitro_service service ) throws Exception { } }
bridgetable obj = new bridgetable ( ) ; bridgetable [ ] response = ( bridgetable [ ] ) obj . get_resources ( service ) ; return response ;
public class ConnectionReadCompletedCallback { /** * begin F181603.2 */ protected void stopReceiving ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "stopReceiving" ) ; receivePhysicalCloseRequest = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "stopReceiving" , "" + receivePhysicalCloseRequest ) ;
public class SharedCount { /** * Changes the shared count only if its value has not changed since the version specified by * newCount . If the count has changed , the value is not set and this client ' s view of the * value is updated . i . e . if the count is not successful you can get the updated value * by cal...
VersionedValue < byte [ ] > previousCopy = new VersionedValue < byte [ ] > ( previous . getVersion ( ) , toBytes ( previous . getValue ( ) ) ) ; return sharedValue . trySetValue ( previousCopy , toBytes ( newCount ) ) ;
public class AtomPositionMap { /** * Returns a list of { @ link ResidueRange ResidueRanges } corresponding to this entire AtomPositionMap . */ public List < ResidueRangeAndLength > getRanges ( ) { } }
String currentChain = "" ; ResidueNumber first = null ; ResidueNumber prev = null ; List < ResidueRangeAndLength > ranges = new ArrayList < ResidueRangeAndLength > ( ) ; for ( ResidueNumber rn : treeMap . keySet ( ) ) { if ( ! rn . getChainName ( ) . equals ( currentChain ) ) { if ( first != null ) { ResidueRangeAndLen...
public class ReflectUtil { /** * 调用指定对象的指定方法 * @ param obj 指定对象 , 不能为空 , 如果要调用的方法为静态方法那么传入Class对象 * @ param methodName 要调用的方法名 , 不能为空 * @ param parameterTypes 方法参数类型 , 方法没有参数请传null * @ param args 参数 * @ param < R > 结果类型 * @ return 调用结果 */ @ SuppressWarnings ( "unchecked" ) public static < R > R invoke ( Obj...
Assert . isFalse ( CollectionUtil . safeIsEmpty ( parameterTypes ) ^ CollectionUtil . safeIsEmpty ( args ) , "方法参数类型列表必须和方法参数列表一致" ) ; Assert . isTrue ( parameterTypes == null || parameterTypes . length == args . length , "方法参数类型列表长度必须和方法参数列表长度一致" ) ; Method method ; if ( obj instanceof Class ) { method = getMethod ( (...
public class GridFile { /** * Checks whether the parent directories are present ( and are directories ) . If createIfAbsent is true , * creates missing dirs * @ param path * @ param createIfAbsent * @ return */ protected boolean checkParentDirs ( String path , boolean createIfAbsent ) throws IOException { } }
String [ ] components = Util . components ( path , SEPARATOR ) ; if ( components == null ) return false ; if ( components . length == 1 ) // no parent directories to create , e . g . " data . txt " return true ; StringBuilder sb = new StringBuilder ( ) ; boolean first = true ; for ( int i = 0 ; i < components . length ...
public class ListDeviceInstancesResult { /** * An object containing information about your device instances . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setDeviceInstances ( java . util . Collection ) } or { @ link # withDeviceInstances ( java . util . C...
if ( this . deviceInstances == null ) { setDeviceInstances ( new java . util . ArrayList < DeviceInstance > ( deviceInstances . length ) ) ; } for ( DeviceInstance ele : deviceInstances ) { this . deviceInstances . add ( ele ) ; } return this ;
public class FileUploadValidator { /** * 验证文件大小 , 文件名 , 文件后缀 * @ param files * @ param maxLength * @ param allowExtName * @ return */ public List < MultipartFile > validateFiles ( List < MultipartFile > files , long maxLength , String [ ] allowExtName ) { } }
List < MultipartFile > retFiles = new ArrayList < MultipartFile > ( ) ; for ( MultipartFile multipartFile : files ) { try { this . validateFile ( multipartFile , maxLength , allowExtName ) ; retFiles . add ( multipartFile ) ; } catch ( Exception e ) { LOG . warn ( e . toString ( ) ) ; } } return retFiles ;
public class FileBasedTemporalSemanticSpace { /** * Loads the { @ link TemporalSemanticSpace } from the sparse text formatted * file . * @ param sspaceFile a file in { @ link TSSpaceFormat # SPARSE _ TEXT sparse text } * format */ private Map < String , SemanticVector > loadSparseText ( File sspaceFile ) throws I...
LOGGER . info ( "loading sparse text TSS from " + sspaceFile ) ; BufferedReader br = new BufferedReader ( new FileReader ( sspaceFile ) ) ; String [ ] header = br . readLine ( ) . split ( "\\s+" ) ; int words = Integer . parseInt ( header [ 0 ] ) ; dimensions = Integer . parseInt ( header [ 1 ] ) ; Map < String , Seman...
public class LinuxTaskController { /** * get the Job ID from the information in the TaskControllerContext */ private String getJobId ( TaskControllerContext context ) { } }
String taskId = context . task . getTaskID ( ) . toString ( ) ; TaskAttemptID tId = TaskAttemptID . forName ( taskId ) ; String jobId = tId . getJobID ( ) . toString ( ) ; return jobId ;
public class Profiler { /** * Returns a specific instance of profiler , specifying verbosity * < br > * < p style = " color : red " > * NOTE : Verbosity is not guaranteed . since loggers are cached , if there was another * profiler with the specified name and it was not verbose , that instance will be * retur...
if ( Profiler . profilers . containsKey ( name ) ) return Profiler . profilers . get ( name ) ; else { Profiler p = new Profiler ( verbose ) ; Profiler . profilers . put ( name , p ) ; return p ; }
public class PISAHypervolume { /** * / * remove all points which have a value < = ' threshold ' regarding the * dimension ' objective ' ; the points referenced by * ' front [ 0 . . noPoints - 1 ] ' are considered ; ' front ' is resorted , such that * ' front [ 0 . . n - 1 ] ' contains the remaining points ; ' n '...
int n ; int i ; n = noPoints ; for ( i = 0 ; i < n ; i ++ ) { if ( front [ i ] [ objective ] <= threshold ) { n -- ; swap ( front , i , n ) ; } } return n ;
public class CommerceOrderLocalServiceBaseImpl { /** * Creates a new commerce order with the primary key . Does not add the commerce order to the database . * @ param commerceOrderId the primary key for the new commerce order * @ return the new commerce order */ @ Override @ Transactional ( enabled = false ) public...
return commerceOrderPersistence . create ( commerceOrderId ) ;
public class MessageProcessorMatching { /** * Method retrieveMatchingConsumerPoints * Used to retrieve matching ConsumerPoints from the MatchSpace . * @ param destUuid The destination name to retrieve matches * @ param cmUuid The consumer manager uuid * @ param msg The msg to key against for selector support ...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "retrieveMatchingConsumerPoints" , new Object [ ] { destUuid , cmUuid , msg , searchResults } ) ; // Form a branch for the MatchSpace from a combination of the destination uuid and // the CM uuid String mSpacePrefix = destUu...
public class TypeSystem { /** * The only core OOB type we will define is the Struct to represent the Identity of an Instance . */ private void registerCoreTypes ( ) { } }
idType = new IdType ( ) ; coreTypes . put ( idType . getStructType ( ) . getName ( ) , idType . getStructType ( ) ) ;
public class Postbox { /** * Initialize this component . < br > * This is basically called by DI setting file . */ @ PostConstruct public synchronized void initialize ( ) { } }
final FwCoreDirection direction = assistCoreDirection ( ) ; final SMailDeliveryDepartment deliveryDepartment = direction . assistMailDeliveryDepartment ( ) ; postOffice = deliveryDepartment != null ? newPostOffice ( deliveryDepartment ) : null ; prepareHotDeploy ( ) ; showBootLogging ( ) ;
public class PerfModules { /** * return all the ModuleConfigs */ public static PmiModuleConfig [ ] getConfigs40 ( ) { } }
int index = modulePrefix . indexOf ( "xml." ) ; if ( index > 0 ) { moduleIDs = moduleIDs40 ; modulePrefix = modulePrefix . substring ( 0 , index ) ; moduleConfigs = new HashMap ( ) ; } initConfigs ( ) ; return getConfigs ( ) ;
public class WebImage { /** * Build the image url . * @ return the full image url string */ public String getUrl ( ) { } }
final StringBuilder sb = new StringBuilder ( ) ; sb . append ( secured ( ) ? "https://" : "http://" ) . append ( website ( ) ) . append ( path ( ) ) . append ( name ( ) ) . append ( extension ( ) ) ; return sb . toString ( ) ;
public class CmsRelationSystemValidator { /** * Validates the links for the specified resource . < p > * @ param dbc the database context * @ param resource the resource that will be validated * @ param fileLookup a map for faster lookup with all resources keyed by their rootpath * @ param project the project t...
List < CmsRelation > brokenRelations = new ArrayList < CmsRelation > ( ) ; Map < String , Boolean > validatedLinks = new HashMap < String , Boolean > ( ) ; // get the relations List < CmsRelation > incomingRelationsOnline = new ArrayList < CmsRelation > ( ) ; List < CmsRelation > outgoingRelationsOffline = new ArrayLis...
public class TransferListener { /** * Return true if new session for transaction * @ param xferId * @ param sessionId * @ return boolean */ private boolean isNewSession ( String xferId , String sessionId ) { } }
List < String > currentSessions = transactionSessions . get ( xferId ) ; if ( currentSessions == null ) { List < String > sessions = new ArrayList < String > ( ) ; sessions . add ( sessionId ) ; transactionSessions . put ( xferId , sessions ) ; return true ; } else if ( ! currentSessions . contains ( sessionId ) ) { cu...
public class CommerceCurrencyUtil { /** * Returns the last commerce currency in the ordered set where groupId = & # 63 ; and primary = & # 63 ; and active = & # 63 ; . * @ param groupId the group ID * @ param primary the primary * @ param active the active * @ param orderByComparator the comparator to order the...
return getPersistence ( ) . fetchByG_P_A_Last ( groupId , primary , active , orderByComparator ) ;
public class AbstractTicketRegistry { /** * Encode ticket . * @ param ticket the ticket * @ return the ticket */ @ SneakyThrows protected Ticket encodeTicket ( final Ticket ticket ) { } }
if ( ! isCipherExecutorEnabled ( ) ) { LOGGER . trace ( MESSAGE ) ; return ticket ; } if ( ticket == null ) { LOGGER . debug ( "Ticket passed is null and cannot be encoded" ) ; return null ; } LOGGER . debug ( "Encoding ticket [{}]" , ticket ) ; val encodedTicketObject = SerializationUtils . serializeAndEncodeObject ( ...
public class GanttDesignerReader { /** * Read project properties . * @ param gantt Gantt Designer file */ private void readProjectProperties ( Gantt gantt ) { } }
Gantt . File file = gantt . getFile ( ) ; ProjectProperties props = m_projectFile . getProjectProperties ( ) ; props . setLastSaved ( file . getSaved ( ) ) ; props . setCreationDate ( file . getCreated ( ) ) ; props . setName ( file . getName ( ) ) ;
public class ApiOvhTelephony { /** * Alter this object properties * REST : PUT / telephony / { billingAccount } / ovhPabx / { serviceName } / tts / { id } * @ param body [ required ] New object properties * @ param billingAccount [ required ] The name of your billingAccount * @ param serviceName [ required ] ...
String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/tts/{id}" ; StringBuilder sb = path ( qPath , billingAccount , serviceName , id ) ; exec ( qPath , "PUT" , sb . toString ( ) , body ) ;
public class ResponseBuilder { /** * Builds a DOM response . * @ param availableResources * list of resources to include in the output * @ return streaming output */ public static StreamingOutput buildDOMResponse ( final List < String > availableResources ) { } }
try { final Document document = createSurroundingXMLResp ( ) ; final Element resElement = createResultElement ( document ) ; final List < Element > resources = createCollectionElement ( availableResources , document ) ; for ( final Element resource : resources ) { resElement . appendChild ( resource ) ; } document . ap...
public class SocketRWChannelSelector { /** * @ see com . ibm . ws . tcpchannel . internal . ChannelSelector # updateCount ( ) */ @ Override protected void updateCount ( ) { } }
// set counter to the actual value , rather than to try and // keep track with a seperate variable . // This counter must only be updated by the selector thread , // which allows us to omit synchronized logic . // there can be timing windows where before we signal a deletion , // another request comes in , but the time...
public class GwAPI { /** * Setup XML and JSON implementations for each supported Version type * We do this by taking the Code passed in and creating clones of these with the appropriate Facades and properties * to do Versions and Content switches */ public void route ( HttpMethods meth , String path , API api , GwC...
String version = "1.0" ; // Get Correct API Class from Mapper Class < ? > respCls = facade . mapper ( ) . getClass ( api ) ; if ( respCls == null ) throw new Exception ( "Unknown class associated with " + api . getClass ( ) . getName ( ) + ' ' + api . name ( ) ) ; // setup Application API HTML ContentTypes for JSON and...
public class NodeGroupClient { /** * Returns the specified NodeGroup . Get a list of available NodeGroups by making a list ( ) request . * Note : the " nodes " field should not be used . Use nodeGroups . listNodes instead . * < p > Sample code : * < pre > < code > * try ( NodeGroupClient nodeGroupClient = NodeG...
GetNodeGroupHttpRequest request = GetNodeGroupHttpRequest . newBuilder ( ) . setNodeGroup ( nodeGroup == null ? null : nodeGroup . toString ( ) ) . build ( ) ; return getNodeGroup ( request ) ;
public class CommerceCountryPersistenceImpl { /** * Returns the commerce countries before and after the current commerce country in the ordered set where groupId = & # 63 ; and billingAllowed = & # 63 ; and active = & # 63 ; . * @ param commerceCountryId the primary key of the current commerce country * @ param gro...
CommerceCountry commerceCountry = findByPrimaryKey ( commerceCountryId ) ; Session session = null ; try { session = openSession ( ) ; CommerceCountry [ ] array = new CommerceCountryImpl [ 3 ] ; array [ 0 ] = getByG_B_A_PrevAndNext ( session , commerceCountry , groupId , billingAllowed , active , orderByComparator , tru...
public class SslContextFactory { /** * Override this method to provide alternate way to load a truststore . * @ return the key store instance * @ throws Exception */ protected KeyStore loadTrustStore ( ) throws Exception { } }
return getKeyStore ( trustStoreInputStream , sslConfig . getTrustStorePath ( ) , sslConfig . getTrustStoreType ( ) , sslConfig . getTrustStoreProvider ( ) , sslConfig . getTrustStorePassword ( ) ) ;
public class TableProcessor { /** * Adds relationship info into metadata for a given field * < code > relationField < / code > . * @ param entityClass * the entity class * @ param relationField * the relation field * @ param metadata * the metadata */ private void addRelationIntoMetadata ( Class < ? > ent...
RelationMetadataProcessor relProcessor = null ; try { relProcessor = RelationMetadataProcessorFactory . getRelationMetadataProcessor ( relationField , kunderaMetadata ) ; this . factory . validate ( relationField , new RelationAttributeRule ( ) ) ; relProcessor = RelationMetadataProcessorFactory . getRelationMetadataPr...
public class RouteBuilder { /** * Sets the URI ( pattern ) of the resulting route . * @ param uri the uri that can use the route uri pattern , must not be { @ literal null } . * @ return the current route builder */ public RouteBuilder on ( String uri ) { } }
if ( ! uri . startsWith ( "/" ) ) { this . uri = "/" + uri ; } else { this . uri = uri ; } return this ;
public class DividableGridAdapter { /** * Adds a new item to the adapter . * @ param item * The item , which should be added , as an instance of the class { @ link AbstractItem } . * The item may not be null */ public final void add ( @ NonNull final AbstractItem item ) { } }
Condition . INSTANCE . ensureNotNull ( item , "The item may not be null" ) ; items . add ( item ) ; if ( item instanceof Item && ( ( Item ) item ) . getIcon ( ) != null ) { iconCount ++ ; } else if ( item instanceof Divider ) { dividerCount ++ ; } rawItems = null ; notifyOnDataSetChanged ( ) ;
public class JsonUtils { /** * Use the stringToType method instead . */ @ Deprecated public static < T > T jsonTo ( String json , TypeReference < T > typeRef ) { } }
return util . stringToType ( json , typeRef ) ;
public class WritableComparator { /** * Lexicographic order of binary data . */ public static int compareBytes ( byte [ ] b1 , int s1 , int l1 , byte [ ] b2 , int s2 , int l2 ) { } }
return FastByteComparisons . compareTo ( b1 , s1 , l1 , b2 , s2 , l2 ) ;
public class PartialApplicator { /** * Returns a function with 1 arguments applied to the supplied Function * @ param t1 Generic argument * @ param func Function * @ param < T1 > Generic argument type * @ param < T2 > Generic argument type * @ param < R > Function generic return type * @ return Function as ...
return ( ) -> func . apply ( t1 ) ;
public class StorageAccountsInner { /** * Asynchronously creates a new storage account with the specified parameters . If an account is already created and a subsequent create request is issued with different properties , the account properties will be updated . If an account is already created and a subsequent create ...
return beginCreateWithServiceResponseAsync ( resourceGroupName , accountName , parameters ) . toBlocking ( ) . single ( ) . body ( ) ;
public class RollingFileWriter { /** * Creates policies from a nullable string . * @ param property * Nullable string with policies to create * @ return Created policies */ private static List < Policy > createPolicies ( final String property ) { } }
if ( property == null || property . isEmpty ( ) ) { return Collections . < Policy > singletonList ( new StartupPolicy ( null ) ) ; } else { ServiceLoader < Policy > loader = new ServiceLoader < Policy > ( Policy . class , String . class ) ; List < Policy > policies = new ArrayList < Policy > ( ) ; for ( String entry : ...
public class UnionIterator { /** * Takes the resulting union and builds the { @ link # current _ values } * and { @ link # meta } maps . * @ param ordered _ union The union to build from . */ private void setCurrentAndMeta ( final ByteMap < ExpressionDataPoint [ ] > ordered_union ) { } }
for ( final String id : queries . keySet ( ) ) { current_values . put ( id , new ExpressionDataPoint [ ordered_union . size ( ) ] ) ; // TODO - blech . Fill with a sentinel value to reflect " no data here ! " final int [ ] m = new int [ ordered_union . size ( ) ] ; for ( int i = 0 ; i < m . length ; i ++ ) { m [ i ] = ...
public class HashOperations { /** * This is a classical Knuth - style Open Addressing , Double Hash insert scheme , but inserts * values directly into a Memory . * This method assumes that the input hash is not a duplicate . * Useful for rebuilding tables to avoid unnecessary comparisons . * Returns the index o...
final int arrayMask = ( 1 << lgArrLongs ) - 1 ; // current Size - 1 final int stride = getStride ( hash , lgArrLongs ) ; int curProbe = ( int ) ( hash & arrayMask ) ; // search for duplicate or zero final int loopIndex = curProbe ; do { final int curProbeOffsetBytes = ( curProbe << 3 ) + memOffsetBytes ; final long cur...
public class ClassContext { /** * Check for the name in the current context and classdef , and if not present search the global context . Note that * the context chain is not followed . * @ see Context # check ( ILexNameToken ) */ @ Override public Value check ( ILexNameToken name ) { } }
// A RootContext stops the name search from continuing down the // context chain . It first checks any local context , then it // checks the " class " context , then it goes down to the global level . Value v = get ( name ) ; // Local variables if ( v != null ) { return v ; } if ( freeVariables != null ) { v = freeVari...
public class AbstractGeneratorConfigurationBlock { /** * Create the " experimental " warning message . * @ param composite the parent . */ protected void createExperimentalWarningMessage ( Composite composite ) { } }
final Label dangerIcon = new Label ( composite , SWT . WRAP ) ; dangerIcon . setImage ( getImage ( IMAGE ) ) ; final GridData labelLayoutData = new GridData ( ) ; labelLayoutData . horizontalIndent = 0 ; dangerIcon . setLayoutData ( labelLayoutData ) ;
public class AbstractMaterialDialogBuilder { /** * Obtains the window background from a specific theme . * @ param themeResourceId * The resource id of the theme , the window background should be obtained from , as an * { @ link Integer } value */ private void obtainWindowBackground ( @ StyleRes final int themeRe...
TypedArray typedArray = getContext ( ) . getTheme ( ) . obtainStyledAttributes ( themeResourceId , new int [ ] { R . attr . materialDialogWindowBackground } ) ; int resourceId = typedArray . getResourceId ( 0 , 0 ) ; if ( resourceId != 0 ) { setWindowBackground ( resourceId ) ; } else { setWindowBackground ( R . drawab...
public class TableSession { /** * Retreive this relative record in the table . * This method is used exclusively by the get method to read a single row of a grid table . * @ param iRowIndex The row to retrieve . * @ return The record or an error code as an Integer . * @ exception DBException File exception . ...
try { Utility . getLogger ( ) . info ( "get row " + iRowIndex ) ; GridTable gridTable = this . getGridTable ( this . getMainRecord ( ) ) ; gridTable . getCurrentTable ( ) . getRecord ( ) . setEditMode ( Constants . EDIT_NONE ) ; Record record = ( Record ) gridTable . get ( iRowIndex ) ; int iRecordStatus = DBConstants ...
public class CassQuery { /** * Gets column name for a given field name . * @ param metadata * the metadata * @ param property * the property * @ return the column name */ private String getColumnName ( EntityMetadata metadata , String property ) { } }
MetamodelImpl metaModel = ( MetamodelImpl ) kunderaMetadata . getApplicationMetadata ( ) . getMetamodel ( metadata . getPersistenceUnit ( ) ) ; String jpaColumnName = null ; if ( property . equals ( ( ( AbstractAttribute ) metadata . getIdAttribute ( ) ) . getJPAColumnName ( ) ) ) { jpaColumnName = CassandraUtilities ....
public class UserCoreDao { /** * Query for all rows * @ return result */ public TResult queryForAll ( ) { } }
TResult result = userDb . query ( getTableName ( ) , table . getColumnNames ( ) , null , null , null , null , null ) ; prepareResult ( result ) ; return result ;
public class OperationsInner { /** * Get operation . * @ param locationName The name of the location . * @ param operationName The name of the operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the OperationResultInner object */ public Observabl...
return getWithServiceResponseAsync ( locationName , operationName ) . map ( new Func1 < ServiceResponse < OperationResultInner > , OperationResultInner > ( ) { @ Override public OperationResultInner call ( ServiceResponse < OperationResultInner > response ) { return response . body ( ) ; } } ) ;
public class NumberPickerPreference { /** * Initializes the preference . * @ param attributeSet * The attribute set , the attributes should be obtained from , as an instance of the type * { @ link AttributeSet } or null , if no attributes should be obtained * @ param defaultStyle * The default style to apply ...
obtainStyledAttributes ( attributeSet , defaultStyle , defaultStyleResource ) ;
public class DBCluster { /** * Provides a list of VPC security groups that the DB cluster belongs to . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setVpcSecurityGroups ( java . util . Collection ) } or { @ link # withVpcSecurityGroups ( java . util . Coll...
if ( this . vpcSecurityGroups == null ) { setVpcSecurityGroups ( new com . amazonaws . internal . SdkInternalList < VpcSecurityGroupMembership > ( vpcSecurityGroups . length ) ) ; } for ( VpcSecurityGroupMembership ele : vpcSecurityGroups ) { this . vpcSecurityGroups . add ( ele ) ; } return this ;
public class AbstractLogoutServlet { /** * 在SSO注销之后 , 默认会跳转回到应用根地址 , 这个时候有可能由于缓存导致浏览器不会自动跳转到登录页 。 * 这里返回一个随机状态码让浏览器不使用缓存页面 。 * 默认状态码是当前是时间毫秒数 , 如果不希望增加这个状态码 , 可以重写这个方法返回一个空值 。 */ protected String getStateQueryParam ( HttpServletRequest req , HttpServletResponse resp ) { } }
return String . valueOf ( System . currentTimeMillis ( ) ) ;
public class BucketSort { /** * Adds new element to the bucket builder . The value must be between * min _ value and max _ value . * @ param The * value used for bucketing . * @ param The * index of the element to store in the buffer . Usually it is an * index into some array , where the real elements are s...
assert ( value >= m_min_value && value <= m_max_value ) ; int bucket = ( int ) ( ( value - m_min_value ) / m_dy ) ; return bucket ;
public class FileUtilsV2_2 { /** * Schedules a directory recursively for deletion on JVM exit . * @ param directory directory to delete , must not be < code > null < / code > * @ throws NullPointerException if the directory is < code > null < / code > * @ throws IOException in case deletion is unsuccessful */ pri...
if ( ! directory . exists ( ) ) { return ; } directory . deleteOnExit ( ) ; if ( ! isSymlink ( directory ) ) { cleanDirectoryOnExit ( directory ) ; }
public class Tuple3 { /** * Constructor method to utilize type inference . * @ param a first component * @ param b second component * @ param c third component * @ param < A > type of the first component * @ param < B > type of the second component * @ param < C > type of the third component * @ return th...
return new Tuple3 < > ( a , b , c ) ;
public class GetAllPremiumRates { /** * Runs the example . * @ param adManagerServices the services factory . * @ param session the session . * @ throws ApiException if the API request failed with one or more service errors . * @ throws RemoteException if the API request failed due to other errors . */ public s...
// Get the PremiumRateService . PremiumRateServiceInterface premiumRateService = adManagerServices . get ( session , PremiumRateServiceInterface . class ) ; // Create a statement to get all premium rates . StatementBuilder statementBuilder = new StatementBuilder ( ) . orderBy ( "id ASC" ) . limit ( StatementBuilder . S...
public class VariableUtils { /** * Cut off double quotes prefix and suffix . * @ param variable * @ return */ public static String cutOffDoubleQuotes ( String variable ) { } }
if ( StringUtils . hasText ( variable ) && variable . length ( ) > 1 && variable . charAt ( 0 ) == '"' && variable . charAt ( variable . length ( ) - 1 ) == '"' ) { return variable . substring ( 1 , variable . length ( ) - 1 ) ; } return variable ;
public class TimeDuration { /** * Creates a { @ link TimeDuration } from the delay passed in parameter * @ param delay the delay either in milliseconds without unit , or in seconds if suffixed by sec or secs . * @ return the TimeDuration created from the delay expressed as a String . */ @ CheckForNull public static...
if ( delay == null ) { return null ; } long unitMultiplier = 1L ; delay = delay . trim ( ) ; try { // TODO : more unit handling if ( delay . endsWith ( "sec" ) || delay . endsWith ( "secs" ) ) { delay = delay . substring ( 0 , delay . lastIndexOf ( "sec" ) ) ; delay = delay . trim ( ) ; unitMultiplier = 1000L ; } retur...
public class FeatureOverlayQuery { /** * Perform a query based upon the map click location and build feature table data * @ param latLng location * @ param view view * @ param map Google Map * @ param projection desired geometry projection * @ return table data on what was clicked , or null * @ since 1.2.7 ...
// Get the zoom level double zoom = MapUtils . getCurrentZoom ( map ) ; // Build a bounding box to represent the click location BoundingBox boundingBox = MapUtils . buildClickBoundingBox ( latLng , view , map , screenClickPercentage ) ; // Get the map click distance tolerance double tolerance = MapUtils . getToleranceD...
public class FluoEntryInputFormat { /** * Configure properties needed to connect to a Fluo application * @ param conf Job configuration * @ param config use { @ link FluoConfiguration } to configure programmatically */ public static void configure ( Job conf , SimpleConfiguration config ) { } }
try { FluoConfiguration fconfig = new FluoConfiguration ( config ) ; try ( Environment env = new Environment ( fconfig ) ) { long ts = env . getSharedResources ( ) . getTimestampTracker ( ) . allocateTimestamp ( ) . getTxTimestamp ( ) ; conf . getConfiguration ( ) . setLong ( TIMESTAMP_CONF_KEY , ts ) ; ByteArrayOutput...
public class WriterBasedGenerator { /** * Helper method to try to call appropriate write method for given * untyped Object . At this point , no structural conversions should be done , * only simple basic types are to be coerced as necessary . * @ param value Non - null value to write */ protected void _writeSimpl...
/* 31 - Dec - 2009 , tatu : Actually , we could just handle some basic * types even without codec . This can improve interoperability , * and specifically help with TokenBuffer . */ if ( value == null ) { writeNull ( ) ; return ; } if ( value instanceof String ) { writeString ( ( String ) value ) ; return ; } if ( ...
public class DayCountConvention_ACT_ACT_ICMA { /** * / * ( non - Javadoc ) * @ see net . finmath . time . daycount . DayCountConventionInterface # getDaycountFraction ( org . threeten . bp . LocalDate , org . threeten . bp . LocalDate ) */ @ Override public double getDaycountFraction ( LocalDate startDate , LocalDate...
if ( startDate . isAfter ( endDate ) ) { return - getDaycountFraction ( endDate , startDate ) ; } int periodIndexEndDate = Collections . binarySearch ( periods , new Period ( endDate , endDate , endDate , endDate ) ) ; int periodIndexStartDate = Collections . binarySearch ( periods , new Period ( startDate , startDate ...
public class UniversalProjectReader { /** * Open a database and build a set of table names . * @ param url database URL * @ return set containing table names */ private Set < String > populateTableNames ( String url ) throws SQLException { } }
Set < String > tableNames = new HashSet < String > ( ) ; Connection connection = null ; ResultSet rs = null ; try { connection = DriverManager . getConnection ( url ) ; DatabaseMetaData dmd = connection . getMetaData ( ) ; rs = dmd . getTables ( null , null , null , null ) ; while ( rs . next ( ) ) { tableNames . add (...
public class QueryExecutorImpl { /** * Send a query to the backend . */ private void sendQuery ( Query query , V3ParameterList parameters , int maxRows , int fetchSize , int flags , ResultHandler resultHandler , BatchResultHandler batchHandler ) throws IOException , SQLException { } }
// Now the query itself . Query [ ] subqueries = query . getSubqueries ( ) ; SimpleParameterList [ ] subparams = parameters . getSubparams ( ) ; // We know this is deprecated , but still respect it in case anyone ' s using it . // PgJDBC its self no longer does . @ SuppressWarnings ( "deprecation" ) boolean disallowBat...
public class EncryptedToken { /** * Parses a key - value pair string such as " param1 = WdfaA , param2 = AZrr , param3 " into a map . * < p > Keys with no value are assigned an empty string for convenience . The ` valueMapper ` function is applied to * all values of the map < / p > * @ param kvString a string con...
return Stream . of ( Optional . ofNullable ( kvString ) . map ( StringUtils :: trimAllWhitespace ) . filter ( StringUtils :: hasText ) . map ( s -> s . split ( PAIR_SEPARATOR ) ) . orElse ( new String [ 0 ] ) ) . map ( StringUtils :: trimAllWhitespace ) . map ( pair -> pair . split ( KEY_VALUE_SEPARATOR , 2 ) ) . colle...
public class BatchSampler { /** * Samples a batch of indices in the range [ 0 , numExamples ) without replacement . */ public int [ ] sampleBatchWithoutReplacement ( ) { } }
int [ ] batch = new int [ batchSize ] ; for ( int i = 0 ; i < batch . length ; i ++ ) { if ( cur == indices . length ) { cur = 0 ; } if ( cur == 0 ) { IntArrays . shuffle ( indices ) ; } batch [ i ] = indices [ cur ++ ] ; } return batch ;
public class AMRRuleSetProcessor { /** * / * ( non - Javadoc ) * @ see com . yahoo . labs . samoa . core . Processor # process ( com . yahoo . labs . samoa . core . ContentEvent ) */ @ Override public boolean process ( ContentEvent event ) { } }
if ( event instanceof InstanceContentEvent ) { this . processInstanceEvent ( ( InstanceContentEvent ) event ) ; } else if ( event instanceof PredicateContentEvent ) { PredicateContentEvent pce = ( PredicateContentEvent ) event ; if ( pce . getRuleSplitNode ( ) == null ) { this . updateLearningNode ( pce ) ; } else { th...
public class appfwprofile_contenttype_binding { /** * Use this API to fetch appfwprofile _ contenttype _ binding resources of given name . */ public static appfwprofile_contenttype_binding [ ] get ( nitro_service service , String name ) throws Exception { } }
appfwprofile_contenttype_binding obj = new appfwprofile_contenttype_binding ( ) ; obj . set_name ( name ) ; appfwprofile_contenttype_binding response [ ] = ( appfwprofile_contenttype_binding [ ] ) obj . get_resources ( service ) ; return response ;
public class AtomContainerManipulator { /** * This method will reset all atom configuration to UNSET . * This method is the reverse of { @ link # percieveAtomTypesAndConfigureAtoms ( org . openscience . cdk . interfaces . IAtomContainer ) } * and after a call to this method all atoms will be " unconfigured " . * ...
for ( IAtom atom : container . atoms ( ) ) { atom . setAtomTypeName ( ( String ) CDKConstants . UNSET ) ; atom . setMaxBondOrder ( ( IBond . Order ) CDKConstants . UNSET ) ; atom . setBondOrderSum ( ( Double ) CDKConstants . UNSET ) ; atom . setCovalentRadius ( ( Double ) CDKConstants . UNSET ) ; atom . setValency ( ( ...
public class CmsToolbar { /** * Helper method for setting toolbar visibility . < p > * @ param toolbar the toolbar * @ param show true if the toolbar should be shown * @ param toolbarVisibility the style variable controlling the toolbar visibility */ public static void showToolbar ( final CmsToolbar toolbar , fin...
if ( show ) { toolbarVisibility . setValue ( null ) ; } else { toolbarVisibility . setValue ( I_CmsLayoutBundle . INSTANCE . toolbarCss ( ) . toolbarHide ( ) ) ; }
public class HtmlDocletWriter { /** * Return the link to the given package . * @ param pkg the package to link to . * @ param label the label for the link . * @ return a content tree for the package link . */ public Content getPackageLink ( PackageDoc pkg , Content label ) { } }
boolean included = pkg != null && pkg . isIncluded ( ) ; if ( ! included ) { for ( PackageDoc p : configuration . packages ) { if ( p . equals ( pkg ) ) { included = true ; break ; } } } if ( included || pkg == null ) { return getHyperLink ( pathString ( pkg , DocPaths . PACKAGE_SUMMARY ) , label ) ; } else { DocLink c...
public class csvserver_stats { /** * Use this API to fetch statistics of csvserver _ stats resource of given name . */ public static csvserver_stats get ( nitro_service service , String name ) throws Exception { } }
csvserver_stats obj = new csvserver_stats ( ) ; obj . set_name ( name ) ; csvserver_stats response = ( csvserver_stats ) obj . stat_resource ( service ) ; return response ;
public class AbstractAmazonDynamoDBAsync { /** * Simplified method form for invoking the DeleteItem operation . * @ see # deleteItemAsync ( DeleteItemRequest ) */ @ Override public java . util . concurrent . Future < DeleteItemResult > deleteItemAsync ( String tableName , java . util . Map < String , AttributeValue >...
return deleteItemAsync ( new DeleteItemRequest ( ) . withTableName ( tableName ) . withKey ( key ) ) ;
public class LogTable { /** * Add this record ( Always called from the record class ) . * @ exception DBException File exception . */ public void add ( Rec fieldList ) throws DBException { } }
super . add ( fieldList ) ; this . logTrx ( ( FieldList ) fieldList , ProxyConstants . ADD ) ;
import java . util . Arrays ; import java . util . Collections ; class CheckMonotonic { /** * Checks if array elements are either consistently increasing or decreasing . * Examples : * is _ monotonic ( [ 1 , 2 , 4 , 20 ] ) - > True * is _ monotonic ( [ 1 , 20 , 4 , 10 ] ) - > False * is _ monotonic ( [ 4 , 1 , ...
Integer [ ] sortedArray = array . clone ( ) ; Integer [ ] reversedArray = array . clone ( ) ; Arrays . sort ( sortedArray ) ; Arrays . sort ( reversedArray , Collections . reverseOrder ( ) ) ; return Arrays . equals ( array , sortedArray ) || Arrays . equals ( array , reversedArray ) ;
public class CProductLocalServiceBaseImpl { /** * Deletes the c product from the database . Also notifies the appropriate model listeners . * @ param cProduct the c product * @ return the c product that was removed */ @ Indexable ( type = IndexableType . DELETE ) @ Override public CProduct deleteCProduct ( CProduct...
return cProductPersistence . remove ( cProduct ) ;
public class MutableDoubleArrayTrieInteger { /** * 转移状态 * @ param state * @ param codePoint * @ return */ public int transfer ( int state , int codePoint ) { } }
if ( state < 1 ) { return - 1 ; } if ( ( state != 1 ) && ( isEmpty ( state ) ) ) { return - 1 ; } int [ ] ids = this . charMap . toIdList ( codePoint ) ; if ( ids . length == 0 ) { return - 1 ; } return transfer ( state , ids ) ;
public class CassandraExecutionDAO { /** * This is a dummy implementation and this feature is not implemented * for Cassandra backed Conductor */ @ Override public List < Task > getTasks ( String taskType , String startKey , int count ) { } }
throw new UnsupportedOperationException ( "This method is not implemented in CassandraExecutionDAO. Please use ExecutionDAOFacade instead." ) ;
public class ProcessExecutorImpl { /** * Method that creates the event log based on the passed in params */ EventWaitInstance createEventWaitInstances ( Long actInstId , String [ ] pEventNames , String [ ] pWakeUpEventTypes , boolean [ ] pEventOccurances , boolean notifyIfArrived , boolean reregister ) throws DataAcces...
try { EventWaitInstance ret = null ; Long documentId = null ; String pCompCode = null ; int i ; for ( i = 0 ; i < pEventNames . length ; i ++ ) { pCompCode = pWakeUpEventTypes [ i ] ; documentId = edao . recordEventWait ( pEventNames [ i ] , ! pEventOccurances [ i ] , 3600 , // TODO set this value in designer ! actInst...
public class FilterServletResponseWrapper { /** * Ferme le flux . * @ throws IOException e */ public void close ( ) throws IOException { } }
if ( writer != null ) { writer . close ( ) ; } else if ( stream != null ) { stream . close ( ) ; }
public class JsonSchema { /** * Get optional property from a { @ link JsonObject } for a { @ link String } key . * If key does ' nt exists returns { @ link # DEFAULT _ VALUE _ FOR _ OPTIONAL _ PROPERTY } . * @ param jsonObject * @ param key * @ return */ private String getOptionalProperty ( JsonObject jsonObjec...
return jsonObject . has ( key ) ? jsonObject . get ( key ) . getAsString ( ) : DEFAULT_VALUE_FOR_OPTIONAL_PROPERTY ;
public class ModuleConfigImpl { /** * / * ( non - Javadoc ) * @ see org . jboss . as . cli . handlers . module . ModuleConfig # getDependencies ( ) */ @ Override public Collection < Dependency > getDependencies ( ) { } }
return dependencies == null ? Collections . < Dependency > emptyList ( ) : dependencies ;
public class Range { /** * Sums the boundaries of this range with the ones of the passed . So the returned range has * this . min + plus . min as minimum and this . max + plus . max as maximum respectively . * @ return a range object whose boundaries are summed */ public Range sumBoundaries ( final Range plus ) { }...
int newMin = min + plus . min ; int newMax = max == RANGE_MAX || plus . max == RANGE_MAX ? RANGE_MAX : max + plus . max ; return new Range ( newMin , newMax ) ;
public class BinaryIntExpressionHelper { /** * writes a std compare . This involves the tokens IF _ ICMPEQ , IF _ ICMPNE , * IF _ ICMPEQ , IF _ ICMPNE , IF _ ICMPGE , IF _ ICMPGT , IF _ ICMPLE and IF _ ICMPLT * @ param type the token type * @ return true if a successful std compare write */ protected boolean writ...
type = type - COMPARE_NOT_EQUAL ; // look if really compare if ( type < 0 || type > 7 ) return false ; if ( ! simulate ) { MethodVisitor mv = getController ( ) . getMethodVisitor ( ) ; OperandStack operandStack = getController ( ) . getOperandStack ( ) ; // operands are on the stack already int bytecode = stdCompareCod...
public class DefaultGroovyMethods { /** * A helper method to allow lists to work with subscript operators . * < pre class = " groovyTestCase " > def list = [ " a " , true , 42 , 9.4] * list [ 1 , 4 ] = [ " x " , false ] * assert list = = [ " a " , " x " , 42 , 9.4 , false ] < / pre > * @ param self a List * @...
if ( splice . isEmpty ( ) ) { if ( ! values . isEmpty ( ) ) throw new IllegalArgumentException ( "Trying to replace 0 elements with " + values . size ( ) + " elements" ) ; return ; } Object first = splice . iterator ( ) . next ( ) ; if ( first instanceof Integer ) { if ( values . size ( ) != splice . size ( ) ) throw n...
public class SessionDriver { /** * Set the priority for this session in the ClusterManager * @ param prio the priority of this session * @ throws IOException */ public void setPriority ( SessionPriority prio ) throws IOException { } }
if ( failException != null ) { throw failException ; } sessionInfo . priority = prio ; SessionInfo newInfo = new SessionInfo ( sessionInfo ) ; cmNotifier . addCall ( new ClusterManagerService . sessionUpdateInfo_args ( sessionId , newInfo ) ) ;
public class TransformProcessRecordReader { /** * Load multiple records from the given a list of { @ link RecordMetaData } instances < br > * @ param recordMetaDatas Metadata for the records that we want to load from * @ return Multiple records for the given RecordMetaData instances * @ throws IOException If I / ...
return recordReader . loadFromMetaData ( recordMetaDatas ) ;
public class ExcelDataProviderImpl { /** * A utility method that setups up data members which are arrays . * @ param memberInfo * A { @ link DataMemberInformation } object that represents values pertaining to every data member . * @ throws IllegalAccessException * @ throws ArrayIndexOutOfBoundsException * @ t...
logger . entering ( memberInfo ) ; Field eachField = memberInfo . getField ( ) ; Object objectToSetDataInto = memberInfo . getObjectToSetDataInto ( ) ; String data = memberInfo . getDataToUse ( ) ; Class < ? > eachFieldType = eachField . getType ( ) ; // We are dealing with arrays String [ ] arrayData = data . split ( ...
public class ChainedProperty { /** * Parses a chained property . * @ param info Info for Storable type containing property * @ param str string to parse * @ throws IllegalArgumentException if any parameter is null or string * format is incorrect */ @ SuppressWarnings ( "unchecked" ) public static < S extends St...
if ( info == null || str == null ) { throw new IllegalArgumentException ( ) ; } int pos = 0 ; int dot = str . indexOf ( '.' , pos ) ; String name ; if ( dot < 0 ) { name = str . trim ( ) ; } else { name = str . substring ( pos , dot ) . trim ( ) ; pos = dot + 1 ; } List < Boolean > outerJoinList = null ; if ( name . st...
public class AmazonSNSClient { /** * Prepares to subscribe an endpoint by sending the endpoint a confirmation message . To actually create a * subscription , the endpoint owner must call the < code > ConfirmSubscription < / code > action with the token from the * confirmation message . Confirmation tokens are valid...
request = beforeClientExecution ( request ) ; return executeSubscribe ( request ) ;
public class KnowledgeSessionFactory { /** * 创建一个用于批处理的BatchSession对象 , 这里默认将开启10个普通的线程池来运行提交的批处理任务 , 第二个参数用来决定单个线程处理的任务数 * @ param knowledgePackage 创建BatchSession对象所需要的KnowledgePackage对象 * @ param batchSize 单个线程处理的任务数 * @ return 返回一个新的BatchSession对象 */ public static BatchSession newBatchSessionByBatchSize ( Know...
return new BatchSessionImpl ( knowledgePackage , BatchSession . DEFAULT_THREAD_SIZE , batchSize ) ;
public class View { /** * Get all views that have the same prefix if specified . * The prefix ends with slash ' / ' character . * @ return An array of all views with the same prefix . */ @ InterfaceAudience . Private protected List < View > getViewsInGroup ( ) { } }
List < View > views = new ArrayList < View > ( ) ; int slash = name . indexOf ( '/' ) ; if ( slash > 0 ) { String prefix = name . substring ( 0 , slash + 1 ) ; for ( View view : database . getAllViews ( ) ) { if ( view . name . startsWith ( prefix ) ) views . add ( view ) ; } } else views . add ( this ) ; return views ...