signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ServiceloaderMojo { /** * Writes the output for the service files to disk * @ param serviceImplementations * @ throws MojoExecutionException */ private void writeServiceFiles ( Map < String , List < String > > serviceImplementations ) throws MojoExecutionException { } }
// TODO give the user an option to write them to the source folder or // any other folder ? File parentFolder = new File ( getClassFolder ( ) , "META-INF" + File . separator + "services" ) ; if ( ! parentFolder . exists ( ) ) { parentFolder . mkdirs ( ) ; } for ( Entry < String , List < String > > interfaceClassName : ...
public class EntryMapper { /** * Creates a paxtools object that * corresponds to the psi interaction . * Note : * psi . interactionElementType - & gt ; biopax Complex , MolecularInteraction , or GeneticInteraction * psi . interactionElementType . participantList - & gt ; biopax interaction / complex participant...
Entity bpInteraction = null ; // interaction or complex boolean isGeneticInteraction = false ; // get interaction name / short name String name = null ; String shortName = null ; if ( interaction . hasNames ( ) ) { Names names = interaction . getNames ( ) ; name = ( names . hasFullName ( ) ) ? names . getFullName ( ) :...
public class ConfigReader { /** * read config from confingPath * @ param confingFilename like axu4j . xml */ public static void load ( String confingFilename ) { } }
try { if ( config == null ) { config = new AXUConfig ( ) ; logger . debug ( "create new AXUConfig instance" ) ; } // DEV 모드인 경우 각 태그마다 config를 요청하므로 3초에 한 번씩만 설정을 로딩하도록 한다 . long nowTime = ( new Date ( ) ) . getTime ( ) ; if ( nowTime - lastLoadTime < 3000 ) { return ; } e...
public class S3StorageProvider { /** * { @ inheritDoc } */ public String addContent ( String spaceId , String contentId , String contentMimeType , Map < String , String > userProperties , long contentSize , String contentChecksum , InputStream content ) { } }
log . debug ( "addContent(" + spaceId + ", " + contentId + ", " + contentMimeType + ", " + contentSize + ", " + contentChecksum + ")" ) ; // Will throw if bucket does not exist String bucketName = getBucketName ( spaceId ) ; // Wrap the content in order to be able to retrieve a checksum ChecksumInputStream wrappedConte...
public class BNFHeadersImpl { /** * Method to marshall a header out in binary mode into the input * buffers ( expanding them if necessary ) . * @ param inBuffers * @ param elem * @ return WsByteBuffer [ ] */ protected WsByteBuffer [ ] marshallBinaryHeader ( WsByteBuffer [ ] inBuffers , HeaderElement elem ) { } ...
if ( elem . wasRemoved ( ) ) { return inBuffers ; } WsByteBuffer [ ] buffers = inBuffers ; final byte [ ] value = elem . asRawBytes ( ) ; if ( null != value ) { HeaderKeys key = elem . getKey ( ) ; if ( ! key . isUndefined ( ) ) { buffers = putInt ( GenericConstants . KNOWN_HEADER , buffers ) ; buffers = putInt ( elem ...
public class DistributedLayoutManager { /** * Handles pushing changes made to the passed - in node into the user ' s layout . If the node is an * ILF node then the change is recorded via directives in the PLF if such changes are allowed by * the owning fragment . If the node is a user owned node then the changes ar...
if ( canUpdateNode ( node ) ) { String nodeId = node . getId ( ) ; IUserLayoutNodeDescription oldNode = getNode ( nodeId ) ; if ( oldNode instanceof IUserLayoutChannelDescription ) { IUserLayoutChannelDescription oldChanDesc = ( IUserLayoutChannelDescription ) oldNode ; if ( ! ( node instanceof IUserLayoutChannelDescri...
public class BuildUniqueIdentifierHelper { /** * Get a project according to its full name . * @ param fullName The full name of the project . * @ return The project which answers the full name . */ private static AbstractProject < ? , ? > getProject ( String fullName ) { } }
Item item = Hudson . getInstance ( ) . getItemByFullName ( fullName ) ; if ( item != null && item instanceof AbstractProject ) { return ( AbstractProject < ? , ? > ) item ; } return null ;
public class JarHandler { /** * Build and return the externalized string representation of url . * @ return String the externalized string representation of url * @ param url * a URL */ @ Override protected String toExternalForm ( URL url ) { } }
StringBuilder sb = new StringBuilder ( ) ; sb . append ( "jar:" ) ; sb . append ( url . getFile ( ) ) ; String ref = url . getRef ( ) ; if ( ref != null ) { sb . append ( ref ) ; } return sb . toString ( ) ;
public class SubscriptionItemStream { /** * Mark this itemstream as awaiting deletion */ public void markAsToBeDeleted ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "markAsToBeDeleted" ) ; toBeDeleted = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "markAsToBeDeleted" ) ;
public class OpenCmsCore { /** * Writes the XML configuration for the provided configuration class . < p > * @ param clazz the configuration class to write the XML for */ protected void writeConfiguration ( Class < ? > clazz ) { } }
// exception handling is provided here to ensure identical log messages try { m_configurationManager . writeConfiguration ( clazz ) ; } catch ( IOException e ) { CmsLog . getLog ( CmsConfigurationManager . class ) . error ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_ERROR_WRITING_CONFIG_1 , clazz . getNa...
public class JSONSAXHandler { /** * Method to flush out anything remaining in the buffers . */ public void flushBuffer ( ) throws IOException { } }
if ( logger . isLoggable ( Level . FINER ) ) logger . entering ( className , "flushBuffer()" ) ; if ( this . osWriter != null ) { this . osWriter . flush ( ) ; } if ( logger . isLoggable ( Level . FINER ) ) logger . exiting ( className , "flushBuffer()" ) ;
public class StreamHelper { /** * Get the content of the passed Spring resource as one big string in the passed * character set . * @ param aISP * The resource to read . May not be < code > null < / code > . * @ param aCharset * The character set to use . May not be < code > null < / code > . * @ return < c...
return readStreamLines ( aISP , aCharset , 0 , CGlobal . ILLEGAL_UINT ) ;
public class RecurlyClient { /** * Redeem a { @ link Coupon } on an account . * @ param couponCode redeemed coupon id * @ return the { @ link Coupon } object */ public Redemption redeemCoupon ( final String couponCode , final Redemption redemption ) { } }
return doPOST ( Coupon . COUPON_RESOURCE + "/" + couponCode + Redemption . REDEEM_RESOURCE , redemption , Redemption . class ) ;
public class CmsResourceTypeStatResultList { /** * Adds a result to the list . < p > * @ param result to be added */ public void addResult ( CmsResourceTypeStatResult result ) { } }
if ( ! m_results . contains ( result ) ) { m_results . add ( result ) ; m_updated = false ; } else { m_results . remove ( result ) ; m_results . add ( result ) ; m_updated = true ; }
public class AcroFields { /** * Sets different values in a list selection . * No appearance is generated yet ; nor does the code check if multiple select is allowed . * @ paramnamethe name of the field * @ paramvaluean array with values that need to be selected * @ returntrue only if the field value was changed...
Item item = getFieldItem ( name ) ; if ( item == null ) return false ; PdfName type = item . getMerged ( 0 ) . getAsName ( PdfName . FT ) ; if ( ! PdfName . CH . equals ( type ) ) { return false ; } String [ ] options = getListOptionExport ( name ) ; PdfArray array = new PdfArray ( ) ; for ( int i = 0 ; i < value . len...
public class Goro { /** * Gives access to Goro instance that is provided by a service . * @ param binder Goro service binder * @ return Goro instance provided by the service */ public static Goro from ( final IBinder binder ) { } }
if ( binder instanceof GoroService . GoroBinder ) { return ( ( GoroService . GoroBinder ) binder ) . goro ( ) ; } throw new IllegalArgumentException ( "Cannot get Goro from " + binder ) ;
public class ModelsEngine { /** * The Gamma function . * @ param x * @ return the calculated gamma function . */ public static double gamma ( double x ) { } }
double tmp = ( x - 0.5 ) * log ( x + 4.5 ) - ( x + 4.5 ) ; double ser = 1.0 + 76.18009173 / ( x + 0 ) - 86.50532033 / ( x + 1 ) + 24.01409822 / ( x + 2 ) - 1.231739516 / ( x + 3 ) + 0.00120858003 / ( x + 4 ) - 0.00000536382 / ( x + 5 ) ; double gamma = exp ( tmp + log ( ser * sqrt ( 2 * PI ) ) ) ; return gamma ;
public class LogManager { /** * Runs through the log removing segments until the size of the log is at least * logRetentionSize bytes in size * @ throws IOException */ private int cleanupSegmentsToMaintainSize ( final Log log ) throws IOException { } }
if ( logRetentionSize < 0 || log . size ( ) < logRetentionSize ) return 0 ; List < LogSegment > toBeDeleted = log . markDeletedWhile ( new LogSegmentFilter ( ) { long diff = log . size ( ) - logRetentionSize ; public boolean filter ( LogSegment segment ) { diff -= segment . size ( ) ; return diff >= 0 ; } } ) ; return ...
public class ChemModel { /** * { @ inheritDoc } */ @ Override public boolean isEmpty ( ) { } }
if ( setOfMolecules != null && ! setOfMolecules . isEmpty ( ) ) return false ; if ( setOfReactions != null && ! setOfReactions . isEmpty ( ) ) return false ; if ( ringSet != null && ! ringSet . isEmpty ( ) ) return false ; if ( crystal != null && ! crystal . isEmpty ( ) ) return false ; return true ;
public class GraphFunctionParser { /** * Parse the weight and orientation ( s ) from two strings , given in arbitrary * order . * @ param arg1 Weight or orientation * @ param arg2 Weight or orientation */ public void parseWeightAndOrientation ( String arg1 , String arg2 ) { } }
if ( ( arg1 == null && arg2 == null ) || ( isWeightString ( arg1 ) && arg2 == null ) || ( arg1 == null && isWeightString ( arg2 ) ) ) { // Disable default orientations ( D and WD ) . throw new IllegalArgumentException ( "You must specify the orientation." ) ; } if ( isWeightString ( arg1 ) && isWeightString ( arg2 ) ) ...
public class Model { /** * Deletes immediate children . */ private void deleteOne2ManyChildrenShallow ( OneToManyAssociation association ) { } }
String targetTable = metaModelOf ( association . getTargetClass ( ) ) . getTableName ( ) ; new DB ( metaModelLocal . getDbName ( ) ) . exec ( "DELETE FROM " + targetTable + " WHERE " + association . getFkName ( ) + " = ?" , getId ( ) ) ;
public class SSOClient { /** * 使用 < code > client _ id < / code > 和 < code > client _ secret < / code > 通过 < code > grant _ type = client _ credentials < / code > 的方式 * 获取access token 。 * 返回SSO颁发给当前应用的access token , 代表当前应用的身份 。 * @ see < a href = " http : / / openid . net / specs / openid - connect - core - 1_0 ....
String key = "obtainAccessTokenByClientCredentials:" + config . getClientId ( ) ; AccessToken accessToken = getAccessTokenFromCache ( key ) ; if ( accessToken != null ) { return accessToken ; } accessToken = tp ( ) . obtainAccessTokenByClientCredentials ( ) ; cp ( ) . put ( key , accessToken , accessToken . getExpires ...
public class WsByteBufferUtils { /** * Convert a buffer into a byte array . A null or empty buffer will return a * null * byte [ ] . * @ param buff * @ return byte [ ] */ public static final byte [ ] asByteArray ( WsByteBuffer buff ) { } }
if ( null == buff ) return null ; int size = buff . limit ( ) ; if ( 0 == size ) { return null ; } byte [ ] output = new byte [ size ] ; int position = buff . position ( ) ; buff . position ( 0 ) ; buff . get ( output ) ; buff . position ( position ) ; return output ;
public class AwsSecurityFindingFilters { /** * The source domain of network - related information about a finding . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setNetworkSourceDomain ( java . util . Collection ) } or { @ link # withNetworkSourceDomain ( j...
if ( this . networkSourceDomain == null ) { setNetworkSourceDomain ( new java . util . ArrayList < StringFilter > ( networkSourceDomain . length ) ) ; } for ( StringFilter ele : networkSourceDomain ) { this . networkSourceDomain . add ( ele ) ; } return this ;
public class CmsSecurityManager { /** * Returns all resources of organizational units for which the current user has * the given role role . < p > * @ param dbc the current database context * @ param role the role to check * @ return a list of { @ link org . opencms . file . CmsResource } objects * @ throws C...
CmsOrganizationalUnit ou = m_driverManager . readOrganizationalUnit ( dbc , role . getOuFqn ( ) ) ; if ( hasRole ( dbc , dbc . currentUser ( ) , role ) ) { return m_driverManager . getResourcesForOrganizationalUnit ( dbc , ou ) ; } List < CmsResource > resources = new ArrayList < CmsResource > ( ) ; Iterator < CmsOrgan...
public class UserCoreDao { /** * Query the SQL for a single result typed object * @ param < T > * result value type * @ param sql * sql statement * @ param args * arguments * @ param column * column index * @ return result , null if no result * @ since 3.1.0 */ public < T > T querySingleTypedResult ...
return db . querySingleTypedResult ( sql , args , column ) ;
public class RowExtractors { /** * Create an extractor that extracts the name from the node at the given position in the row . * @ param indexInRow the index of the node in the rows ; must be valid * @ param cache the cache containing the nodes ; may not be null * @ param types the type system ; may not be null ...
final TypeFactory < String > type = types . getStringFactory ( ) ; final boolean trace = NodeSequence . LOGGER . isTraceEnabled ( ) ; return new ExtractFromRow ( ) { @ Override public TypeFactory < String > getType ( ) { return type ; } @ Override public Object getValueInRow ( RowAccessor row ) { CachedNode node = row ...
public class Smb2ChangeNotifyRequest { /** * { @ inheritDoc } * @ see jcifs . internal . smb2 . ServerMessageBlock2 # writeBytesWireFormat ( byte [ ] , int ) */ @ Override protected int writeBytesWireFormat ( byte [ ] dst , int dstIndex ) { } }
int start = dstIndex ; SMBUtil . writeInt2 ( 32 , dst , dstIndex ) ; SMBUtil . writeInt2 ( this . notifyFlags , dst , dstIndex + 2 ) ; dstIndex += 4 ; SMBUtil . writeInt4 ( this . outputBufferLength , dst , dstIndex ) ; dstIndex += 4 ; System . arraycopy ( this . fileId , 0 , dst , dstIndex , 16 ) ; dstIndex += 16 ; SM...
public class RepositoryBrowser { /** * Returns all the registered { @ link RepositoryBrowser } descriptors . */ public static DescriptorExtensionList < RepositoryBrowser < ? > , Descriptor < RepositoryBrowser < ? > > > all ( ) { } }
return ( DescriptorExtensionList ) Jenkins . getInstance ( ) . getDescriptorList ( RepositoryBrowser . class ) ;
public class DTMDefaultBaseIterators { /** * Get an iterator that can navigate over an XPath Axis , predicated by * the extended type ID . * Returns an iterator that must be initialized * with a start node ( using iterator . setStartNode ( ) ) . * @ param axis One of Axes . ANCESTORORSELF , etc . * @ param ty...
DTMAxisIterator iterator = null ; /* This causes an error when using patterns for elements that do not exist in the DOM ( translet types which do not correspond to a DOM type are mapped to the DOM . ELEMENT type ) . */ // if ( type = = NO _ TYPE ) { // return ( EMPTYITERATOR ) ; // else if ( type = = ELEMENT ) { //...
public class ServletSendErrorTask { /** * { @ inheritDoc } */ public void perform ( TaskRequest req , TaskResponse res ) { } }
HttpServletResponse resp = ( HttpServletResponse ) response . evaluate ( req , res ) ; Integer sc = ( Integer ) statusCode . evaluate ( req , res ) ; String msg = ( String ) message . evaluate ( req , res ) ; try { resp . sendError ( sc , msg ) ; } catch ( Throwable t ) { throw new RuntimeException ( "Error setting sta...
public class XDMClientParentSbb { /** * ( non - Javadoc ) * @ see XDMClientParent # subscribeFailed ( int , * XDMClientChildSbbLocalObject , * java . net . URI ) */ @ Override public void subscribeFailed ( int responseCode , XDMClientChildSbbLocalObject child , String notifier ) { } }
tracer . severe ( "Failed to subscribe, response = " + responseCode ) ;
public class SegmentHelper { /** * The method sends a WireCommand to iterate over table entries . * @ param tableName Qualified table name . * @ param suggestedEntryCount Suggested number of { @ link TableKey } s to be returned by the SegmentStore . * @ param state Last known state of the iterator . * @ param d...
final Controller . NodeUri uri = getTableUri ( tableName ) ; final WireCommandType type = WireCommandType . READ_TABLE_ENTRIES ; final long requestId = ( clientRequestId == RequestTag . NON_EXISTENT_ID ) ? idGenerator . get ( ) : clientRequestId ; final IteratorState token = ( state == null ) ? IteratorState . EMPTY : ...
public class MessageTransport { /** * Add this field in the Record ' s field sequence . */ public BaseField setupField ( int iFieldSeq ) { } }
BaseField field = null ; // if ( iFieldSeq = = 0) // field = new CounterField ( this , ID , Constants . DEFAULT _ FIELD _ LENGTH , null , null ) ; // field . setHidden ( true ) ; // if ( iFieldSeq = = 1) // field = new RecordChangedField ( this , LAST _ CHANGED , Constants . DEFAULT _ FIELD _ LENGTH , null , null ) ; /...
public class NetworkMonitor { /** * Creates a new network monitor using the supplied options . * @ throws KNXException on problems on monitor creation */ private void createMonitor ( LinkListener l ) throws KNXException { } }
final KNXMediumSettings medium = ( KNXMediumSettings ) options . get ( "medium" ) ; if ( options . containsKey ( "serial" ) ) { final String p = ( String ) options . get ( "serial" ) ; try { m = new KNXNetworkMonitorFT12 ( Integer . parseInt ( p ) , medium ) ; } catch ( final NumberFormatException e ) { m = new KNXNetw...
public class A_CmsListResourceCollector { /** * Sets the resources parameter . < p > * @ param resources the list of resource names to use */ protected void setResourcesParam ( List < String > resources ) { } }
m_collectorParameter += I_CmsListResourceCollector . SEP_PARAM + I_CmsListResourceCollector . PARAM_RESOURCES + I_CmsListResourceCollector . SEP_KEYVAL ; if ( resources == null ) { // search anywhere m_collectorParameter += "/" ; } else { m_collectorParameter += CmsStringUtil . collectionAsString ( resources , "#" ) ; ...
public class BasicFunctionsRuntime { /** * Returns the smallest ( closest to negative infinity ) integer value that is greater than or equal * to the argument . */ public static long ceil ( SoyValue arg ) { } }
if ( arg instanceof IntegerData ) { return ( ( IntegerData ) arg ) . longValue ( ) ; } else { return ( long ) Math . ceil ( arg . floatValue ( ) ) ; }
public class StopMojo { /** * { @ inheritDoc } */ @ SuppressWarnings ( "rawtypes" ) public void doExecute ( ) throws MojoExecutionException , MojoFailureException { } }
Map pluginContext = session . getPluginContext ( pluginDescriptor , project ) ; FileSystemServer mrm = ( FileSystemServer ) pluginContext . get ( StartMojo . getFileSystemServerKey ( getMojoExecution ( ) ) ) ; if ( mrm == null ) { getLog ( ) . info ( "Mock Repository Manager was not started" ) ; return ; } String url =...
public class Blacklist { /** * Adds a new blacklisted ID . * @ param id ID of the blacklisted molecule * @ param score the ubiquity score * @ param context context of ubiquity */ public void addEntry ( String id , int score , RelType context ) { } }
this . score . put ( id , score ) ; this . context . put ( id , context ) ;
public class StringUtils { /** * Extracts the filename from a path . * @ param filePath * the string to parse * @ return the path containing only the filename itself */ public static String getFilenameFromString ( String filePath ) { } }
String newPath = filePath ; int forwardInd = filePath . lastIndexOf ( "/" ) ; int backInd = filePath . lastIndexOf ( "\\" ) ; if ( forwardInd > backInd ) { newPath = filePath . substring ( forwardInd + 1 ) ; } else { newPath = filePath . substring ( backInd + 1 ) ; } // still original if no occurance of " / " or " \ " ...
public class OnlineUpdateUASparser { /** * Loads the data file from user - agent - string . info * @ throws IOException */ private void loadDataFromInternet ( ) throws IOException { } }
URL url = new URL ( DATA_RETRIVE_URL ) ; InputStream is = url . openStream ( ) ; try { PHPFileParser fp = new PHPFileParser ( is ) ; createInternalDataStructre ( fp . getSections ( ) ) ; } finally { is . close ( ) ; }
public class MultiCameraToEquirectangular { /** * Provides recent images from all the cameras ( should be time and lighting synchronized ) and renders them * into an equirectangular image . The images must be in the same order that the cameras were added . * @ param cameraImages List of camera images */ public void...
if ( cameraImages . size ( ) != cameras . size ( ) ) throw new IllegalArgumentException ( "Input camera image count doesn't equal the expected number" ) ; // avoid divide by zero errors by initializing it to a small non - zero value GImageMiscOps . fill ( weightImage , 1e-4 ) ; GImageMiscOps . fill ( averageImage , 0 )...
public class HazelcastSlidingWindowRequestRateLimiter { @ Override public boolean resetLimit ( String key ) { } }
IMap < Object , Object > map = hz . getMap ( key ) ; if ( map == null || map . isEmpty ( ) ) { return false ; } map . clear ( ) ; map . destroy ( ) ; return true ;
public class Reflections { /** * Copy paste from Guice MoreTypes */ @ SuppressWarnings ( "unckecked" ) public static Class < ? > getRawType ( Type type ) { } }
if ( type instanceof Class < ? > ) { // type is a normal class . return ( Class < ? > ) type ; } else if ( type instanceof ParameterizedType ) { ParameterizedType parameterizedType = ( ParameterizedType ) type ; // I ' m not exactly sure why getRawType ( ) returns Type instead of Class . // Neal isn ' t either but susp...
public class CmsDomUtil { /** * Creates an iFrame element with the given name attribute . < p > * @ param name the name attribute value * @ return the iFrame element */ public static com . google . gwt . dom . client . Element createIFrameElement ( String name ) { } }
return getDOMImpl ( ) . createIFrameElement ( Document . get ( ) , name ) ;
public class ShareError { /** * List of accounts impacted by the error . * @ param accounts * List of accounts impacted by the error . */ public void setAccounts ( java . util . Collection < String > accounts ) { } }
if ( accounts == null ) { this . accounts = null ; return ; } this . accounts = new java . util . ArrayList < String > ( accounts ) ;
public class GUIObjectDetails { /** * DO NOT tamper with this method */ public String returnArg ( String key ) { } }
SeLionElement element = HtmlSeLionElementSet . getInstance ( ) . findMatch ( key ) ; if ( element == null ) { return key ; } if ( ! element . isUIElement ( ) ) { return key ; } return key . substring ( 0 , key . indexOf ( element . getElementClass ( ) ) ) ;
public class MediumPennTemplateAcceptor { /** * A package - private method that checks whether the path matches any of the * predefined templates . This method is provided so other template classes * have access to the accept logic used by this class . * @ param path a dependency path * @ return { @ code true }...
// First check whether the minimum template acceptor would allow this // path if ( MinimumPennTemplateAcceptor . acceptsInternal ( path ) ) return true ; // Filter out paths that can ' t match the template due to length if ( path . length ( ) > 3 ) return false ; int pathLength = path . length ( ) ; // The medium set o...
public class ProductSegmentation { /** * Sets the browserLanguageSegment value for this ProductSegmentation . * @ param browserLanguageSegment * The browser language segmentation . { @ link BrowserLanguageTargeting # isTargeted } * must be { @ code true } . * < p > This attribute is optional . */ public void setB...
this . browserLanguageSegment = browserLanguageSegment ;
public class Classes { /** * Get file resource , that is , resource with < em > file < / em > protocol . Try to load resource throwing exception if not * found . If resource protocol is < em > file < / em > returns it as { @ link java . io . File } otherwise throws unsupported * operation . * @ param name resourc...
URL resourceURL = getResource ( name ) ; if ( resourceURL == null ) { throw new NoSuchBeingException ( "Resource |%s| not found." , name ) ; } String protocol = resourceURL . getProtocol ( ) ; if ( "file" . equals ( protocol ) ) try { return new File ( resourceURL . toURI ( ) ) ; } catch ( URISyntaxException e ) { thro...
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcElectricMotorType ( ) { } }
if ( ifcElectricMotorTypeEClass == null ) { ifcElectricMotorTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 218 ) ; } return ifcElectricMotorTypeEClass ;
public class CmsFavoriteEntry { /** * Converts this object to JSON . * @ return the JSON representation * @ throws JSONException if JSON operations fail */ public JSONObject toJson ( ) throws JSONException { } }
JSONObject result = new JSONObject ( ) ; if ( m_detailId != null ) { result . put ( JSON_DETAIL , "" + m_detailId ) ; } if ( m_siteRoot != null ) { result . put ( JSON_SITEROOT , m_siteRoot ) ; } if ( m_structureId != null ) { result . put ( JSON_STRUCTUREID , "" + m_structureId ) ; } if ( m_projectId != null ) { resul...
public class PatternsImpl { /** * Adds a batch of patterns to the specified application . * @ param appId The application ID . * @ param versionId The version ID . * @ param patterns A JSON array containing patterns . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the ...
return batchAddPatternsWithServiceResponseAsync ( appId , versionId , patterns ) . map ( new Func1 < ServiceResponse < List < PatternRuleInfo > > , List < PatternRuleInfo > > ( ) { @ Override public List < PatternRuleInfo > call ( ServiceResponse < List < PatternRuleInfo > > response ) { return response . body ( ) ; } ...
public class ArquillianInterceptor { /** * / * ( non - Javadoc ) * @ see org . spockframework . runtime . extension . AbstractMethodInterceptor # interceptSetupSpecMethod ( org . spockframework . runtime . extension . IMethodInvocation ) */ @ Override public void interceptSetupSpecMethod ( IMethodInvocation invocatio...
Class < ? > specClass = invocation . getSpec ( ) . getReflection ( ) ; log . fine ( "beforeClass " + specClass . getName ( ) ) ; getTestRunner ( ) . beforeClass ( specClass , new InvocationExecutor ( invocation ) ) ;
public class MetaFieldUtil { /** * Returns a new MetaFieldInfo array of all Fields annotated with MetaField * in the runtime object type . If the object is null , this method will * return null . NOTE : This method recursively searches the object . * @ param obj The runtime instance of the object to search . It m...
return toMetaFieldInfoArray ( ( obj != null ? obj . getClass ( ) : null ) , obj , stringForNullValues , ignoreAnnotatedName , true ) ;
public class AdminRelatedqueryAction { @ Execute public HtmlResponse details ( final int crudMode , final String id ) { } }
verifyCrudMode ( crudMode , CrudMode . DETAILS ) ; saveToken ( ) ; return asDetailsHtml ( ) . useForm ( EditForm . class , op -> { op . setup ( form -> { relatedQueryService . getRelatedQuery ( id ) . ifPresent ( entity -> { copyBeanToBean ( entity , form , copyOp -> { copyOp . excludeNull ( ) ; copyOp . exclude ( Cons...
public class MoreSwingUtilities { /** * Implementation of { @ link SwingUtilities # convertMouseEvent ( * Component , MouseEvent , Component ) } that properly sets the * button of the returned event . * ( See http : / / bugs . sun . com / bugdatabase / view _ bug . do ? bug _ id = 7181403 ) * @ param source The...
Point p = SwingUtilities . convertPoint ( source , sourceEvent . getPoint ( ) , destination ) ; Component newSource = source ; if ( destination != null ) { newSource = destination ; } MouseEvent newEvent = null ; if ( sourceEvent instanceof MouseWheelEvent ) { MouseWheelEvent sourceWheelEvent = ( MouseWheelEvent ) sour...
public class PutRecordsRequest { /** * The records associated with the request . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setRecords ( java . util . Collection ) } or { @ link # withRecords ( java . util . Collection ) } if you want to override * the...
if ( this . records == null ) { setRecords ( new com . amazonaws . internal . SdkInternalList < PutRecordsRequestEntry > ( records . length ) ) ; } for ( PutRecordsRequestEntry ele : records ) { this . records . add ( ele ) ; } return this ;
public class PipelineInterpreter { /** * the initialStreamIds are not mutated , but are begin passed for efficiency , as they are being used later in # process ( ) */ private ImmutableSet < Pipeline > selectPipelines ( InterpreterListener interpreterListener , Set < Tuple2 < String , String > > processingBlacklist , Me...
final String msgId = message . getId ( ) ; // if a message - stream combination has already been processed ( is in the set ) , skip that execution final Set < String > streamsIds = initialStreamIds . stream ( ) . filter ( streamId -> ! processingBlacklist . contains ( tuple ( msgId , streamId ) ) ) . filter ( streamCon...
public class JsonPropertyExpander { /** * Populates the collection property of the entity with field values . * @ param entity the entity * @ param keySet the set of entity properties * @ param property the collection property * @ param field the Java field * @ param node the current node * @ param map the ...
for ( String target : keySet ) { if ( node . equalsIgnoreCase ( target ) ) { Iterable subValues = ( Iterable ) map . get ( target ) ; List < Object > valueList = new ArrayList < > ( ) ; for ( Object subValue : subValues ) { Object value = getFieldValueByType ( property . getElementTypeName ( ) , subValue , map , true )...
public class JobStepsInner { /** * Gets the specified version of a job step . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . * @ param jobAgentName T...
return ServiceFuture . fromResponse ( getByVersionWithServiceResponseAsync ( resourceGroupName , serverName , jobAgentName , jobName , jobVersion , stepName ) , serviceCallback ) ;
public class IterableSubject { /** * Checks ( with a side - effect failure ) that the subject does not contain the supplied item . */ public final void doesNotContain ( @ NullableDecl Object element ) { } }
if ( Iterables . contains ( actual ( ) , element ) ) { failWithActual ( "expected not to contain" , element ) ; }
public class MutablePeriod { /** * Adds to each field of this period . * @ param years amount of years to add to this period , which must be zero if unsupported * @ param months amount of months to add to this period , which must be zero if unsupported * @ param weeks amount of weeks to add to this period , which...
setPeriod ( FieldUtils . safeAdd ( getYears ( ) , years ) , FieldUtils . safeAdd ( getMonths ( ) , months ) , FieldUtils . safeAdd ( getWeeks ( ) , weeks ) , FieldUtils . safeAdd ( getDays ( ) , days ) , FieldUtils . safeAdd ( getHours ( ) , hours ) , FieldUtils . safeAdd ( getMinutes ( ) , minutes ) , FieldUtils . saf...
public class WrappedByteBuffer { /** * Skips the specified number of bytes from the current position . * @ param size the number of bytes to skip * @ return the buffer */ public WrappedByteBuffer skip ( int size ) { } }
_autoExpand ( size ) ; _buf . position ( _buf . position ( ) + size ) ; return this ;
public class ComicChatOverlay { /** * Create a tail to the specified rectangular area from the speaker point . */ protected Shape getTail ( int type , Rectangle r , Point speaker ) { } }
// emotes don ' t actually have tails if ( ChatLogic . modeOf ( type ) == ChatLogic . EMOTE ) { return new Area ( ) ; // empty shape } int midx = r . x + ( r . width / 2 ) ; int midy = r . y + ( r . height / 2 ) ; // we actually want to start about SPEAKER _ DISTANCE away from the // speaker int xx = speaker . x - midx...
public class Auth { /** * This method is called via a global method defined in AuthImpl . register ( ) */ @ SuppressWarnings ( "unused" ) void finish ( String hash ) { } }
TokenInfo info = new TokenInfo ( ) ; String error = null ; String errorDesc = "" ; String errorUri = "" ; // Iterate over keys and values in the string hash value to find relevant // information like the access token or an error message . The string will be // in the form of : # key1 = val1 & key2 = val2 & key3 = val3 ...
public class QrCodePositionPatternDetector { /** * Detects position patterns inside the image and forms a graph . * @ param gray Gray scale input image * @ param binary Thresholed version of gray image . */ public void process ( T gray , GrayU8 binary ) { } }
configureContourDetector ( gray ) ; recycleData ( ) ; positionPatterns . reset ( ) ; interpolate . setImage ( gray ) ; // detect squares squareDetector . process ( gray , binary ) ; long time0 = System . nanoTime ( ) ; squaresToPositionList ( ) ; long time1 = System . nanoTime ( ) ; // Create graph of neighboring squar...
public class ClassWriter { /** * where */ void writeStackMapType ( Type t ) { } }
if ( t == null ) { if ( debugstackmap ) System . out . print ( "empty" ) ; databuf . appendByte ( 0 ) ; } else switch ( t . getTag ( ) ) { case BYTE : case CHAR : case SHORT : case INT : case BOOLEAN : if ( debugstackmap ) System . out . print ( "int" ) ; databuf . appendByte ( 1 ) ; break ; case FLOAT : if ( debugstac...
public class TitlePaneButtonForegroundPainter { /** * Paint the enabled state of the button foreground . * @ param g the Graphics2D context to paint with . * @ param c the button to paint . * @ param width the width to paint . * @ param height the height to paint . */ public void paintEnabled ( Graphics2D g , J...
paint ( g , c , width , height , enabledBorder , enabledCorner , enabledInterior ) ;
public class BrowsersDataProvider { /** * Get unique browsers available in a selenium grid . * @ param context context * @ param testConstructor testConstructor * @ return an iterator * @ throws Exception exception */ @ DataProvider ( parallel = true ) public static Iterator < String [ ] > availableUniqueBrowse...
Map < String , String > map = new HashMap < String , String > ( ) ; List < String > browsers = gridBrowsers ( map ) ; HashSet < String > hs = new HashSet < String > ( ) ; hs . addAll ( browsers ) ; browsers . clear ( ) ; browsers . addAll ( hs ) ; return buildIterator ( browsers ) ;
public class DescribeServiceErrorsResult { /** * An array of < code > ServiceError < / code > objects that describe the specified service errors . * @ param serviceErrors * An array of < code > ServiceError < / code > objects that describe the specified service errors . */ public void setServiceErrors ( java . util...
if ( serviceErrors == null ) { this . serviceErrors = null ; return ; } this . serviceErrors = new com . amazonaws . internal . SdkInternalList < ServiceError > ( serviceErrors ) ;
public class SerializationUtils { /** * Decode and deserialize object t . * @ param < T > the type parameter * @ param object the object * @ param cipher the cipher * @ param type the type * @ return the t */ @ SneakyThrows public static < T extends Serializable > T decodeAndDeserializeObject ( final byte [ ]...
return decodeAndDeserializeObject ( object , cipher , type , ArrayUtils . EMPTY_OBJECT_ARRAY ) ;
public class DecimalFormat { /** * Sets the < tt > Currency Usage < / tt > object used to display currency . * This takes effect immediately , if this format is a * currency format . * @ param newUsage new currency context object to use . */ public void setCurrencyUsage ( CurrencyUsage newUsage ) { } }
if ( newUsage == null ) { throw new NullPointerException ( "return value is null at method AAA" ) ; } currencyUsage = newUsage ; Currency theCurrency = this . getCurrency ( ) ; // We set rounding / digit based on currency context if ( theCurrency != null ) { setRoundingIncrement ( theCurrency . getRoundingIncrement ( c...
public class WhiteboxImpl { /** * Sets the field . * @ param object the object * @ param value the value * @ param foundField the found field */ private static void setField ( Object object , Object value , Field foundField ) { } }
foundField . setAccessible ( true ) ; try { int fieldModifiersMask = foundField . getModifiers ( ) ; removeFinalModifierIfPresent ( foundField ) ; foundField . set ( object , value ) ; restoreModifiersToFieldIfChanged ( fieldModifiersMask , foundField ) ; } catch ( IllegalAccessException e ) { throw new RuntimeExceptio...
public class ExpressionArithmetic { /** * A VoltDB extension to use X ' . . ' as a numeric value */ private void voltConvertBinaryLiteralOperandsToBigint ( ) { } }
// Strange that CONCAT is an arithmetic operator . // You could imagine using it for VARBINARY , so // definitely don ' t convert its operands to BIGINT ! assert ( opType != OpTypes . CONCAT ) ; for ( int i = 0 ; i < nodes . length ; ++ i ) { Expression e = nodes [ i ] ; ExpressionValue . voltMutateToBigintType ( e , t...
public class HttpRequest { /** * Set the request content . * @ param content the request content * @ return this HttpRequest */ public HttpRequest withBody ( String content ) { } }
final byte [ ] bodyBytes = content . getBytes ( StandardCharsets . UTF_8 ) ; return withBody ( bodyBytes ) ;
public class CmsDisplayTypeSelectWidget { /** * Updates the select options from the given entity . < p > * @ param entity a top - level content entity */ public void update ( CmsEntity entity ) { } }
String filterType = NO_FILTER ; if ( m_matchTypes ) { List < Object > values = CmsEntity . getValuesForPath ( entity , m_valuePath ) ; if ( values . size ( ) > 1 ) { String firstValue = ( String ) values . get ( 0 ) ; CmsPair < String , String > val = m_options . get ( firstValue ) ; if ( val != null ) { filterType = v...
public class Journal { /** * setter for impactFactor - sets The impact factor of the journal at the time of publication , O * @ generated * @ param v value to set into the feature */ public void setImpactFactor ( String v ) { } }
if ( Journal_Type . featOkTst && ( ( Journal_Type ) jcasType ) . casFeat_impactFactor == null ) jcasType . jcas . throwFeatMissing ( "impactFactor" , "de.julielab.jules.types.Journal" ) ; jcasType . ll_cas . ll_setStringValue ( addr , ( ( Journal_Type ) jcasType ) . casFeatCode_impactFactor , v ) ;
public class UriUtils { /** * Creates a new URL string from the specified base URL and parameters . * @ param baseUrl The base URL excluding parameters . * @ param params The parameters . * @ return The full URL string . */ public static String newUrl ( final String baseUrl , final Collection < Pair < String , St...
final StringBuilder sb = new StringBuilder ( ) ; sb . append ( baseUrl ) ; sb . append ( getUrlParameters ( params , true ) ) ; return sb . toString ( ) ;
public class GVRTransform { /** * Modify the tranform ' s current rotation in quaternion terms . * @ param w * ' W ' component of the quaternion . * @ param x * ' X ' component of the quaternion . * @ param y * ' Y ' component of the quaternion . * @ param z * ' Z ' component of the quaternion . */ publ...
NativeTransform . rotate ( getNative ( ) , w , x , y , z ) ;
public class GroupLayout { /** * Creates a { @ link JPanel } that is configured with an { @ link * HGroupLayout } with the specified on - axis policy , justification and * off - axis policy ( default configuration otherwise ) . */ public static JPanel makeHBox ( Policy policy , Justification justification , Policy ...
return new JPanel ( new HGroupLayout ( policy , offAxisPolicy , DEFAULT_GAP , justification ) ) ;
public class LongTermRetentionBackupsInner { /** * Lists all long term retention backups for a database . * @ param locationName The location of the database * @ param longTermRetentionServerName the String value * @ param longTermRetentionDatabaseName the String value * @ throws IllegalArgumentException thrown...
return listByDatabaseSinglePageAsync ( locationName , longTermRetentionServerName , longTermRetentionDatabaseName ) . concatMap ( new Func1 < ServiceResponse < Page < LongTermRetentionBackupInner > > , Observable < ServiceResponse < Page < LongTermRetentionBackupInner > > > > ( ) { @ Override public Observable < Servic...
public class SU { /** * Returns a { @ link VirtualChannel } that ' s connected to the privilege - escalated environment . * @ param listener * What this method is doing ( such as what process it ' s invoking ) will be sent here . * @ return * Never null . This may represent a channel to a separate JVM , or just...
if ( File . pathSeparatorChar == ';' ) // on Windows return newLocalChannel ( ) ; // TODO : perhaps use RunAs to run as an Administrator ? String os = Util . fixNull ( System . getProperty ( "os.name" ) ) ; if ( os . equals ( "Linux" ) ) return new UnixSu ( ) { protected String sudoExe ( ) { return "sudo" ; } protected...
public class GImageBandMath { /** * Computes the minimum for each pixel across specified bands in the { @ link Planar } image . * @ param input Planar image * @ param output Gray scale image containing minimum pixel values * @ param startBand First band to be considered * @ param lastBand Last band ( inclusive ...
if ( GrayU8 . class == input . getBandType ( ) ) { ImageBandMath . minimum ( ( Planar < GrayU8 > ) input , ( GrayU8 ) output , startBand , lastBand ) ; } else if ( GrayU16 . class == input . getBandType ( ) ) { ImageBandMath . minimum ( ( Planar < GrayU16 > ) input , ( GrayU16 ) output , startBand , lastBand ) ; } else...
public class TextUtils { /** * Converts String array with waypoint _ names values * to a string ready for API consumption . * @ param waypointNames a string representing approaches to each coordinate . * @ return a formatted string . * @ since 3.3.0 */ public static String formatWaypointNames ( String [ ] waypo...
for ( int i = 0 ; i < waypointNames . length ; i ++ ) { if ( waypointNames [ i ] == null ) { waypointNames [ i ] = "" ; } } return TextUtils . join ( ";" , waypointNames ) ;
public class ProcessExecutorImpl { /** * / / / / / other */ private void cancelTasksOfProcessInstance ( ProcessInstance procInst ) throws NamingException , JMSException , SQLException , ServiceLocatorException , MdwException { } }
List < ProcessInstance > processInstanceList = edao . getChildProcessInstances ( procInst . getId ( ) ) ; List < Long > procInstIds = new ArrayList < Long > ( ) ; procInstIds . add ( procInst . getId ( ) ) ; for ( ProcessInstance pi : processInstanceList ) { Process pidef = getProcessDefinition ( pi ) ; if ( pidef . is...
public class SortArgs { /** * Retrieve external keys during sort . { @ literal GET } supports { @ code # } and { @ code * } wildcards . * @ param pattern must not be { @ literal null } . * @ return { @ code this } { @ link SortArgs } . */ public SortArgs get ( String pattern ) { } }
LettuceAssert . notNull ( pattern , "Pattern must not be null" ) ; if ( get == null ) { get = new ArrayList < > ( ) ; } get . add ( pattern ) ; return this ;
public class InternalInputStreamManager { /** * This method creates a Stream if this is the first * inbound message which has been sent to remote Mes * @ param jsMsg * @ throws SIResourceException * @ throws SICoreException */ public void processMessage ( JsMessage jsMsg ) throws SIResourceException { } }
if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "processMessage" , new Object [ ] { jsMsg } ) ; int priority = jsMsg . getPriority ( ) . intValue ( ) ; Reliability reliability = jsMsg . getReliability ( ) ; SIBUuid12 streamID = jsMsg . getGuaranteedStreamUUID ( ) ; StreamSet streamSet = getStreamSet ( streamID , tr...
public class JSDocInfo { /** * Declares a parameter . Parameters are described using the { @ code @ param } * annotation . * @ param jsType the parameter ' s type , it may be { @ code null } when the * { @ code @ param } annotation did not specify a type . * @ param parameter the parameter ' s name */ boolean d...
lazyInitInfo ( ) ; if ( info . parameters == null ) { info . parameters = new LinkedHashMap < > ( ) ; } if ( ! info . parameters . containsKey ( parameter ) ) { info . parameters . put ( parameter , jsType ) ; return true ; } else { return false ; }
public class WriteClass { /** * Write the includes * @ param codeType Target method types */ public void writeIncludes ( CodeType codeType ) { } }
ClassInfo recClassInfo2 = null ; ClassFields recClassFields = null ; try { ClassInfo recClassInfo = ( ClassInfo ) this . getMainRecord ( ) ; String classType = recClassInfo . getField ( ClassInfo . CLASS_TYPE ) . toString ( ) ; String strPackage = this . getPackage ( codeType ) ; m_StreamOut . writeit ( "package " + st...
public class DFSEvaluatorLogOverwriteReaderWriter { /** * Closes the FileSystem . * @ throws Exception */ @ Override public synchronized void close ( ) throws Exception { } }
if ( this . fileSystem != null && ! this . fsClosed ) { this . fileSystem . close ( ) ; this . fsClosed = true ; }
public class SharedTorrent { /** * Bit field availability handler . * Handle updates in piece availability from a peer ' s BITFIELD message . * When this happens , we need to mark in all the pieces the peer has that * they can be reached through this peer , thus augmenting the global * availability of pieces . ...
// Determine if the peer is interesting for us or not , and notify it . BitSet interesting = ( BitSet ) availablePieces . clone ( ) ; synchronized ( this ) { interesting . andNot ( this . completedPieces ) ; interesting . andNot ( this . requestedPieces ) ; } // Record the peer has all the pieces it told us it had . fo...
public class HTMLUtil { /** * Restrict HTML from the specified string except for the specified * regular expressions . */ public static String restrictHTML ( String src , String [ ] regexes ) { } }
if ( StringUtil . isBlank ( src ) ) { return src ; } ArrayList < String > list = new ArrayList < String > ( ) ; list . add ( src ) ; for ( String regexe : regexes ) { Pattern p = Pattern . compile ( regexe , Pattern . CASE_INSENSITIVE ) ; for ( int jj = 0 ; jj < list . size ( ) ; jj += 2 ) { String piece = list . get (...
public class ApiBase { /** * Gets the Dto instance from API . * @ param < T > Type on behalf of which the request is being called . * @ param classOfT Type on behalf of which the request is being called . * @ param methodKey Relevant method key . * @ param entityId Entity identifier . * @ param secondEntityId...
String urlMethod = String . format ( this . getRequestUrl ( methodKey ) , entityId , secondEntityId ) ; RestTool rest = new RestTool ( this . root , true ) ; T response = rest . request ( classOfT , null , urlMethod , this . getRequestType ( methodKey ) ) ; return response ;
public class SntpConnector { /** * / * [ deutsch ] * < p > Liefert die aktuelle Zeit in Mikrosekunden seit dem Beginn der * UNIX - Epoche , n & auml ; mlich [ 1970-01-01T00:00:00,00000Z ] . < / p > * < p > Es handelt sich immer um eine Zeitangabe ohne UTC - Schaltsekunden . < / p > * @ return count of microseco...
if ( ! this . isRunning ( ) ) { Moment m = this . currentTime ( ) ; return ( m . getPosixTime ( ) * MIO + m . getNanosecond ( ) / 1000 ) ; } long micros = SystemClock . MONOTONIC . currentTimeInMicros ( ) ; return ( micros + this . getLastOffset ( micros ) ) ;
public class JPAEnabledManager { /** * Perform a select , without a transaction * @ param aCallable * The callable * @ return The return of the callable or < code > null < / code > upon success * @ param < T > * The return type of the callable */ @ Nonnull public static final < T > JPAExecutionResult < T > do...
ValueEnforcer . notNull ( aCallable , "Callable" ) ; final StopWatch aSW = StopWatch . createdStarted ( ) ; try { // Call callback final T ret = aCallable . call ( ) ; s_aStatsCounterSuccess . increment ( ) ; s_aStatsTimerExecutionSuccess . addTime ( aSW . stopAndGetMillis ( ) ) ; return JPAExecutionResult . createSucc...
public class UnixUserGroupInformation { /** * Store the given < code > ugi < / code > as a comma separated string in * < code > conf < / code > as a property < code > attr < / code > * The String starts with the user name followed by the default group names , * and other group names . * @ param conf configurati...
conf . set ( attr , ugi . toString ( ) ) ;
public class AbstractInputParser { /** * buildTokens . * @ param commandPrefix a char . * @ param tokens a { @ link java . util . List } object . * @ param depth a { @ link java . util . List } object . * @ param line a { @ link java . util . List } object . * @ param value a { @ link java . lang . String } o...
for ( int n = 0 ; n < line . size ( ) ; n ++ ) { if ( depth . size ( ) <= n ) { /* * This is a new command */ depth . add ( line . get ( n ) ) ; /* * an empty keyword means a positional parameter */ if ( line . get ( n ) . key . length ( ) > 0 ) { tokens . add ( new Token ( commandPrefix , dashed ( commandPrefix , line...
public class ClusterState { /** * Attempts to leave the cluster . */ private void leave ( CompletableFuture < Void > future ) { } }
// Set a timer to retry the attempt to leave the cluster . leaveTimeout = context . getThreadContext ( ) . schedule ( context . getElectionTimeout ( ) , ( ) -> { leave ( future ) ; } ) ; // Attempt to leave the cluster by submitting a LeaveRequest directly to the server state . // Non - leader states should forward the...
public class ServerSecurityAlertPoliciesInner { /** * Creates or updates a threat detection policy . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . *...
return createOrUpdateWithServiceResponseAsync ( resourceGroupName , serverName , parameters ) . map ( new Func1 < ServiceResponse < ServerSecurityAlertPolicyInner > , ServerSecurityAlertPolicyInner > ( ) { @ Override public ServerSecurityAlertPolicyInner call ( ServiceResponse < ServerSecurityAlertPolicyInner > respons...