idx
int64 0
41.2k
| question
stringlengths 74
4.04k
| target
stringlengths 7
750
|
|---|---|---|
3,600
|
public int [ ] bestSequence ( SequenceModel ts ) { int [ ] sample = new int [ ts . length ( ) + ts . leftWindow ( ) ] ; for ( int pos = ts . leftWindow ( ) ; pos < sample . length ; pos ++ ) { double [ ] scores = ts . scoresOf ( sample , pos ) ; double total = 0.0 ; for ( int i = 0 ; i < scores . length ; i ++ ) { scores [ i ] = Math . exp ( scores [ i ] ) ; } ArrayMath . normalize ( scores ) ; int l = ArrayMath . sampleFromDistribution ( scores ) ; sample [ pos ] = ts . getPossibleValues ( pos ) [ l ] ; } return sample ; }
|
Runs the Viterbi algorithm on the sequence model given by the TagScorer in order to find the best sequence .
|
3,601
|
public static auditnslogpolicy_csvserver_binding [ ] get ( nitro_service service , String name ) throws Exception { auditnslogpolicy_csvserver_binding obj = new auditnslogpolicy_csvserver_binding ( ) ; obj . set_name ( name ) ; auditnslogpolicy_csvserver_binding response [ ] = ( auditnslogpolicy_csvserver_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch auditnslogpolicy_csvserver_binding resources of given name .
|
3,602
|
public static authenticationcertpolicy_vpnglobal_binding [ ] get ( nitro_service service , String name ) throws Exception { authenticationcertpolicy_vpnglobal_binding obj = new authenticationcertpolicy_vpnglobal_binding ( ) ; obj . set_name ( name ) ; authenticationcertpolicy_vpnglobal_binding response [ ] = ( authenticationcertpolicy_vpnglobal_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch authenticationcertpolicy_vpnglobal_binding resources of given name .
|
3,603
|
public static base_response create ( nitro_service client , sslcertreq resource ) throws Exception { sslcertreq createresource = new sslcertreq ( ) ; createresource . reqfile = resource . reqfile ; createresource . keyfile = resource . keyfile ; createresource . fipskeyname = resource . fipskeyname ; createresource . keyform = resource . keyform ; createresource . pempassphrase = resource . pempassphrase ; createresource . countryname = resource . countryname ; createresource . statename = resource . statename ; createresource . organizationname = resource . organizationname ; createresource . organizationunitname = resource . organizationunitname ; createresource . localityname = resource . localityname ; createresource . commonname = resource . commonname ; createresource . emailaddress = resource . emailaddress ; createresource . challengepassword = resource . challengepassword ; createresource . companyname = resource . companyname ; return createresource . perform_operation ( client , "create" ) ; }
|
Use this API to create sslcertreq .
|
3,604
|
public static snmpoid [ ] get ( nitro_service service , snmpoid_args args ) throws Exception { snmpoid obj = new snmpoid ( ) ; options option = new options ( ) ; option . set_args ( nitro_util . object_to_string_withoutquotes ( args ) ) ; snmpoid [ ] response = ( snmpoid [ ] ) obj . get_resources ( service , option ) ; return response ; }
|
Use this API to fetch all the snmpoid resources that are configured on netscaler . This uses snmpoid_args which is a way to provide additional arguments while fetching the resources .
|
3,605
|
int toMatchDoc ( ) throws IOException { while ( true ) { if ( findMatches ( ) ) { return docID ( ) ; } resetQueue ( ) ; if ( spans . nextDoc ( ) == NO_MORE_DOCS ) { return NO_MORE_DOCS ; } } }
|
To match doc .
|
3,606
|
private boolean collectSpan ( ) throws IOException { if ( lastSpan ) { return false ; } else if ( spans . nextStartPosition ( ) == NO_MORE_POSITIONS ) { lastSpan = true ; return false ; } else { queueSpans . add ( new Match ( spans . startPosition ( ) , spans . endPosition ( ) ) ) ; lastStartPosition = spans . startPosition ( ) ; return true ; } }
|
try to get something in the queue of spans
|
3,607
|
private List < Match > expandWithIgnoreItem ( int docId , Match match ) { List < Match > list = new ArrayList < > ( ) ; try { Set < Integer > ignoreList = ignoreItem . getFullEndPositionList ( docId , match . endPosition ) ; if ( ignoreList != null ) { for ( Integer endPosition : ignoreList ) { list . add ( new Match ( match . startPosition , endPosition ) ) ; } } } catch ( IOException e ) { log . debug ( e ) ; } return list ; }
|
Expand with ignore item .
|
3,608
|
public static csvserver_binding get ( nitro_service service , String name ) throws Exception { csvserver_binding obj = new csvserver_binding ( ) ; obj . set_name ( name ) ; csvserver_binding response = ( csvserver_binding ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch csvserver_binding resource of given name .
|
3,609
|
public static transformglobal_binding get ( nitro_service service ) throws Exception { transformglobal_binding obj = new transformglobal_binding ( ) ; transformglobal_binding response = ( transformglobal_binding ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch a transformglobal_binding resource .
|
3,610
|
public static aaagroup_vpnurl_binding [ ] get ( nitro_service service , String groupname ) throws Exception { aaagroup_vpnurl_binding obj = new aaagroup_vpnurl_binding ( ) ; obj . set_groupname ( groupname ) ; aaagroup_vpnurl_binding response [ ] = ( aaagroup_vpnurl_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch aaagroup_vpnurl_binding resources of given name .
|
3,611
|
final public void addList ( ArrayList < MtasTreeHit < T > > list ) { if ( list != null ) { lists . add ( list ) ; } }
|
Adds the list .
|
3,612
|
private void constructTokenCollection ( final Reader reader ) throws MtasConfigException , MtasParserException { tokenCollection = null ; try { Constructor < ? > c = Class . forName ( parserName ) . getDeclaredConstructor ( MtasConfiguration . class ) ; Object p = c . newInstance ( parserConfiguration ) ; if ( p instanceof MtasParser ) { MtasParser parser = ( MtasParser ) p ; tokenCollection = parser . createTokenCollection ( reader ) ; return ; } else { throw new MtasConfigException ( "no instance of MtasParser" ) ; } } catch ( MtasParserException e ) { log . debug ( e ) ; tokenCollection = new MtasTokenCollection ( ) ; throw new MtasParserException ( e . getMessage ( ) ) ; } catch ( NoSuchMethodException | InvocationTargetException | IllegalAccessException | ClassNotFoundException | InstantiationException e ) { log . debug ( e ) ; throw new MtasConfigException ( e . getClass ( ) . getName ( ) + " : '" + e . getMessage ( ) + "'" ) ; } }
|
Construct token collection .
|
3,613
|
private void readConfigurationFile ( final String configFile ) { InputStream is ; try { is = new FileInputStream ( configFile ) ; processConfiguration ( MtasConfiguration . readConfiguration ( is ) ) ; is . close ( ) ; } catch ( FileNotFoundException e ) { log . error ( "Couldn't find " + configFile , e ) ; } catch ( IOException e ) { log . error ( "Couldn't read " + configFile , e ) ; } }
|
Read configuration file .
|
3,614
|
private void processConfiguration ( final MtasConfiguration config ) throws IOException { HashMap < String , Integer > indexEncodingMapper = new HashMap < > ( ) ; indexEncodingMapper . put ( "payload" , MtasPayloadEncoder . ENCODE_PAYLOAD ) ; indexEncodingMapper . put ( "offset" , MtasPayloadEncoder . ENCODE_OFFSET ) ; indexEncodingMapper . put ( "realoffset" , MtasPayloadEncoder . ENCODE_REALOFFSET ) ; indexEncodingMapper . put ( "parent" , MtasPayloadEncoder . ENCODE_PARENT ) ; if ( config != null ) { for ( int i = 0 ; i < config . children . size ( ) ; i ++ ) { if ( config . children . get ( i ) . name . equals ( CONFIGURATION_MTAS_INDEX ) ) { MtasConfiguration index = config . children . get ( i ) ; for ( int j = 0 ; j < index . children . size ( ) ; j ++ ) { if ( indexEncodingMapper . containsKey ( index . children . get ( j ) . name ) ) { String value = index . children . get ( j ) . attributes . get ( CONFIGURATION_MTAS_INDEX_ATTRIBUTE ) ; if ( ( value . equals ( VALUE_TRUE ) ) || ( value . equals ( VALUE_1 ) ) ) { encodingFlags |= indexEncodingMapper . get ( index . children . get ( j ) . name ) ; } else if ( ( value . equals ( VALUE_FALSE ) ) || ( value . equals ( VALUE_0 ) ) ) { encodingFlags &= ~ indexEncodingMapper . get ( index . children . get ( j ) . name ) ; } } } } else if ( config . children . get ( i ) . name . equals ( CONFIGURATION_MTAS_PARSER ) ) { if ( config . children . get ( i ) . attributes . containsKey ( CONFIGURATION_MTAS_PARSER_ATTRIBUTE ) ) { parserName = config . children . get ( i ) . attributes . get ( CONFIGURATION_MTAS_PARSER_ATTRIBUTE ) ; parserConfiguration = config . children . get ( i ) ; } else { throw new IOException ( "no parser configuration" ) ; } } } } else { throw new IOException ( "no (valid) configuration" ) ; } }
|
Process configuration .
|
3,615
|
public static String encode ( String str ) { try { return java . net . URLEncoder . encode ( str , "UTF-8" ) ; } catch ( java . io . UnsupportedEncodingException ue ) { return str ; } }
|
encodes the given string using URLEncoder .
|
3,616
|
public static base_response update ( nitro_service client , aaatacacsparams resource ) throws Exception { aaatacacsparams updateresource = new aaatacacsparams ( ) ; updateresource . serverip = resource . serverip ; updateresource . serverport = resource . serverport ; updateresource . authtimeout = resource . authtimeout ; updateresource . tacacssecret = resource . tacacssecret ; updateresource . authorization = resource . authorization ; updateresource . accounting = resource . accounting ; updateresource . auditfailedcmds = resource . auditfailedcmds ; updateresource . defaultauthenticationgroup = resource . defaultauthenticationgroup ; return updateresource . update_resource ( client ) ; }
|
Use this API to update aaatacacsparams .
|
3,617
|
public static base_response unset ( nitro_service client , aaatacacsparams resource , String [ ] args ) throws Exception { aaatacacsparams unsetresource = new aaatacacsparams ( ) ; return unsetresource . unset_resource ( client , args ) ; }
|
Use this API to unset the properties of aaatacacsparams resource . Properties that need to be unset are specified in args array .
|
3,618
|
public static aaatacacsparams get ( nitro_service service ) throws Exception { aaatacacsparams obj = new aaatacacsparams ( ) ; aaatacacsparams [ ] response = ( aaatacacsparams [ ] ) obj . get_resources ( service ) ; return response [ 0 ] ; }
|
Use this API to fetch all the aaatacacsparams resources that are configured on netscaler .
|
3,619
|
protected void initParser ( ) throws MtasConfigException { if ( config != null ) { for ( int i = 0 ; i < config . children . size ( ) ; i ++ ) { MtasConfiguration current = config . children . get ( i ) ; if ( current . name . equals ( "autorepair" ) ) { autorepair = current . attributes . get ( "value" ) . equals ( "true" ) ; } if ( current . name . equals ( "makeunique" ) ) { makeunique = current . attributes . get ( "value" ) . equals ( "true" ) ; } } } }
|
Inits the parser .
|
3,620
|
public static base_response add ( nitro_service client , bridgegroup resource ) throws Exception { bridgegroup addresource = new bridgegroup ( ) ; addresource . id = resource . id ; addresource . ipv6dynamicrouting = resource . ipv6dynamicrouting ; return addresource . add_resource ( client ) ; }
|
Use this API to add bridgegroup .
|
3,621
|
public static base_response update ( nitro_service client , bridgegroup resource ) throws Exception { bridgegroup updateresource = new bridgegroup ( ) ; updateresource . id = resource . id ; updateresource . ipv6dynamicrouting = resource . ipv6dynamicrouting ; return updateresource . update_resource ( client ) ; }
|
Use this API to update bridgegroup .
|
3,622
|
public static base_responses update ( nitro_service client , bridgegroup resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { bridgegroup updateresources [ ] = new bridgegroup [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new bridgegroup ( ) ; updateresources [ i ] . id = resources [ i ] . id ; updateresources [ i ] . ipv6dynamicrouting = resources [ i ] . ipv6dynamicrouting ; } result = update_bulk_request ( client , updateresources ) ; } return result ; }
|
Use this API to update bridgegroup resources .
|
3,623
|
public static bridgegroup [ ] get ( nitro_service service ) throws Exception { bridgegroup obj = new bridgegroup ( ) ; bridgegroup [ ] response = ( bridgegroup [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the bridgegroup resources that are configured on netscaler .
|
3,624
|
public static bridgegroup get ( nitro_service service , Long id ) throws Exception { bridgegroup obj = new bridgegroup ( ) ; obj . set_id ( id ) ; bridgegroup response = ( bridgegroup ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch bridgegroup resource of given name .
|
3,625
|
public static tmtrafficpolicy_stats [ ] get ( nitro_service service ) throws Exception { tmtrafficpolicy_stats obj = new tmtrafficpolicy_stats ( ) ; tmtrafficpolicy_stats [ ] response = ( tmtrafficpolicy_stats [ ] ) obj . stat_resources ( service ) ; return response ; }
|
Use this API to fetch the statistics of all tmtrafficpolicy_stats resources that are configured on netscaler .
|
3,626
|
public static tmtrafficpolicy_stats get ( nitro_service service , String name ) throws Exception { tmtrafficpolicy_stats obj = new tmtrafficpolicy_stats ( ) ; obj . set_name ( name ) ; tmtrafficpolicy_stats response = ( tmtrafficpolicy_stats ) obj . stat_resource ( service ) ; return response ; }
|
Use this API to fetch statistics of tmtrafficpolicy_stats resource of given name .
|
3,627
|
public static cmppolicy_lbvserver_binding [ ] get ( nitro_service service , String name ) throws Exception { cmppolicy_lbvserver_binding obj = new cmppolicy_lbvserver_binding ( ) ; obj . set_name ( name ) ; cmppolicy_lbvserver_binding response [ ] = ( cmppolicy_lbvserver_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch cmppolicy_lbvserver_binding resources of given name .
|
3,628
|
public static base_response add ( nitro_service client , lbmetrictable resource ) throws Exception { lbmetrictable addresource = new lbmetrictable ( ) ; addresource . metrictable = resource . metrictable ; return addresource . add_resource ( client ) ; }
|
Use this API to add lbmetrictable .
|
3,629
|
public static base_responses add ( nitro_service client , lbmetrictable resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { lbmetrictable addresources [ ] = new lbmetrictable [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new lbmetrictable ( ) ; addresources [ i ] . metrictable = resources [ i ] . metrictable ; } result = add_bulk_request ( client , addresources ) ; } return result ; }
|
Use this API to add lbmetrictable resources .
|
3,630
|
public static base_response delete ( nitro_service client , lbmetrictable resource ) throws Exception { lbmetrictable deleteresource = new lbmetrictable ( ) ; deleteresource . metrictable = resource . metrictable ; return deleteresource . delete_resource ( client ) ; }
|
Use this API to delete lbmetrictable .
|
3,631
|
public static base_responses delete ( nitro_service client , String metrictable [ ] ) throws Exception { base_responses result = null ; if ( metrictable != null && metrictable . length > 0 ) { lbmetrictable deleteresources [ ] = new lbmetrictable [ metrictable . length ] ; for ( int i = 0 ; i < metrictable . length ; i ++ ) { deleteresources [ i ] = new lbmetrictable ( ) ; deleteresources [ i ] . metrictable = metrictable [ i ] ; } result = delete_bulk_request ( client , deleteresources ) ; } return result ; }
|
Use this API to delete lbmetrictable resources of given names .
|
3,632
|
public static base_response update ( nitro_service client , lbmetrictable resource ) throws Exception { lbmetrictable updateresource = new lbmetrictable ( ) ; updateresource . metrictable = resource . metrictable ; updateresource . metric = resource . metric ; updateresource . Snmpoid = resource . Snmpoid ; return updateresource . update_resource ( client ) ; }
|
Use this API to update lbmetrictable .
|
3,633
|
public static base_responses update ( nitro_service client , lbmetrictable resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { lbmetrictable updateresources [ ] = new lbmetrictable [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new lbmetrictable ( ) ; updateresources [ i ] . metrictable = resources [ i ] . metrictable ; updateresources [ i ] . metric = resources [ i ] . metric ; updateresources [ i ] . Snmpoid = resources [ i ] . Snmpoid ; } result = update_bulk_request ( client , updateresources ) ; } return result ; }
|
Use this API to update lbmetrictable resources .
|
3,634
|
public static lbmetrictable [ ] get ( nitro_service service ) throws Exception { lbmetrictable obj = new lbmetrictable ( ) ; lbmetrictable [ ] response = ( lbmetrictable [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the lbmetrictable resources that are configured on netscaler .
|
3,635
|
public static lbmetrictable get ( nitro_service service , String metrictable ) throws Exception { lbmetrictable obj = new lbmetrictable ( ) ; obj . set_metrictable ( metrictable ) ; lbmetrictable response = ( lbmetrictable ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch lbmetrictable resource of given name .
|
3,636
|
public static lbmetrictable [ ] get ( nitro_service service , String metrictable [ ] ) throws Exception { if ( metrictable != null && metrictable . length > 0 ) { lbmetrictable response [ ] = new lbmetrictable [ metrictable . length ] ; lbmetrictable obj [ ] = new lbmetrictable [ metrictable . length ] ; for ( int i = 0 ; i < metrictable . length ; i ++ ) { obj [ i ] = new lbmetrictable ( ) ; obj [ i ] . set_metrictable ( metrictable [ i ] ) ; response [ i ] = ( lbmetrictable ) obj [ i ] . get_resource ( service ) ; } return response ; } return null ; }
|
Use this API to fetch lbmetrictable resources of given names .
|
3,637
|
public static cspolicylabel_binding get ( nitro_service service , String labelname ) throws Exception { cspolicylabel_binding obj = new cspolicylabel_binding ( ) ; obj . set_labelname ( labelname ) ; cspolicylabel_binding response = ( cspolicylabel_binding ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch cspolicylabel_binding resource of given name .
|
3,638
|
public static vpnvserver_authenticationcertpolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { vpnvserver_authenticationcertpolicy_binding obj = new vpnvserver_authenticationcertpolicy_binding ( ) ; obj . set_name ( name ) ; vpnvserver_authenticationcertpolicy_binding response [ ] = ( vpnvserver_authenticationcertpolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch vpnvserver_authenticationcertpolicy_binding resources of given name .
|
3,639
|
public static vpnglobal_authenticationlocalpolicy_binding [ ] get ( nitro_service service ) throws Exception { vpnglobal_authenticationlocalpolicy_binding obj = new vpnglobal_authenticationlocalpolicy_binding ( ) ; vpnglobal_authenticationlocalpolicy_binding response [ ] = ( vpnglobal_authenticationlocalpolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch a vpnglobal_authenticationlocalpolicy_binding resources .
|
3,640
|
public static rewritepolicy_binding get ( nitro_service service , String name ) throws Exception { rewritepolicy_binding obj = new rewritepolicy_binding ( ) ; obj . set_name ( name ) ; rewritepolicy_binding response = ( rewritepolicy_binding ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch rewritepolicy_binding resource of given name .
|
3,641
|
public static Interface_stats [ ] get ( nitro_service service ) throws Exception { Interface_stats obj = new Interface_stats ( ) ; Interface_stats [ ] response = ( Interface_stats [ ] ) obj . stat_resources ( service ) ; return response ; }
|
Use this API to fetch the statistics of all Interface_stats resources that are configured on netscaler .
|
3,642
|
public static Interface_stats get ( nitro_service service , String id ) throws Exception { Interface_stats obj = new Interface_stats ( ) ; obj . set_id ( id ) ; Interface_stats response = ( Interface_stats ) obj . stat_resource ( service ) ; return response ; }
|
Use this API to fetch statistics of Interface_stats resource of given name .
|
3,643
|
public static service_lbmonitor_binding [ ] get ( nitro_service service , String name ) throws Exception { service_lbmonitor_binding obj = new service_lbmonitor_binding ( ) ; obj . set_name ( name ) ; service_lbmonitor_binding response [ ] = ( service_lbmonitor_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch service_lbmonitor_binding resources of given name .
|
3,644
|
public static rewritepolicy_rewriteglobal_binding [ ] get ( nitro_service service , String name ) throws Exception { rewritepolicy_rewriteglobal_binding obj = new rewritepolicy_rewriteglobal_binding ( ) ; obj . set_name ( name ) ; rewritepolicy_rewriteglobal_binding response [ ] = ( rewritepolicy_rewriteglobal_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch rewritepolicy_rewriteglobal_binding resources of given name .
|
3,645
|
public static base_response update ( nitro_service client , nshostname resource ) throws Exception { nshostname updateresource = new nshostname ( ) ; updateresource . hostname = resource . hostname ; updateresource . ownernode = resource . ownernode ; return updateresource . update_resource ( client ) ; }
|
Use this API to update nshostname .
|
3,646
|
public static base_responses update ( nitro_service client , nshostname resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { nshostname updateresources [ ] = new nshostname [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new nshostname ( ) ; updateresources [ i ] . hostname = resources [ i ] . hostname ; updateresources [ i ] . ownernode = resources [ i ] . ownernode ; } result = update_bulk_request ( client , updateresources ) ; } return result ; }
|
Use this API to update nshostname resources .
|
3,647
|
public static nshostname [ ] get ( nitro_service service , options option ) throws Exception { nshostname obj = new nshostname ( ) ; nshostname [ ] response = ( nshostname [ ] ) obj . get_resources ( service , option ) ; return response ; }
|
Use this API to fetch all the nshostname resources that are configured on netscaler .
|
3,648
|
public static tmsessionpolicy_aaauser_binding [ ] get ( nitro_service service , String name ) throws Exception { tmsessionpolicy_aaauser_binding obj = new tmsessionpolicy_aaauser_binding ( ) ; obj . set_name ( name ) ; tmsessionpolicy_aaauser_binding response [ ] = ( tmsessionpolicy_aaauser_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch tmsessionpolicy_aaauser_binding resources of given name .
|
3,649
|
public static authenticationtacacspolicy_binding get ( nitro_service service , String name ) throws Exception { authenticationtacacspolicy_binding obj = new authenticationtacacspolicy_binding ( ) ; obj . set_name ( name ) ; authenticationtacacspolicy_binding response = ( authenticationtacacspolicy_binding ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch authenticationtacacspolicy_binding resource of given name .
|
3,650
|
public static void main ( String [ ] args ) { Tree stringyTree = null ; try { stringyTree = ( new PennTreeReader ( new StringReader ( "(S (VP (VBZ Try) (NP (DT this))) (. .))" ) , new LabeledScoredTreeFactory ( new StringLabelFactory ( ) ) ) ) . readTree ( ) ; } catch ( IOException e ) { } System . out . println ( stringyTree ) ; Function < Tree , Tree > a = getLabeledTreeToCategoryWordTagTreeFunction ( ) ; Tree adaptyTree = a . apply ( stringyTree ) ; System . out . println ( adaptyTree ) ; adaptyTree . percolateHeads ( new CollinsHeadFinder ( ) ) ; System . out . println ( adaptyTree ) ; Function < Tree , Tree > b = getLabeledTreeToStringLabeledTreeFunction ( ) ; Tree stringLabelTree = b . apply ( adaptyTree ) ; System . out . println ( stringLabelTree ) ; }
|
This method just tests the functionality of the included transformers .
|
3,651
|
protected String cleanUpLabel ( String label ) { if ( label == null ) { return "ROOT" ; } else if ( leaveItAll == 1 ) { return tlp . categoryAndFunction ( label ) ; } else if ( leaveItAll == 2 ) { return label ; } else { boolean nptemp = NPTmpPattern . matcher ( label ) . matches ( ) ; boolean pptemp = PPTmpPattern . matcher ( label ) . matches ( ) ; boolean advptemp = ADVPTmpPattern . matcher ( label ) . matches ( ) ; boolean anytemp = TmpPattern . matcher ( label ) . matches ( ) ; boolean subj = NPSbjPattern . matcher ( label ) . matches ( ) ; boolean npadv = NPAdvPattern . matcher ( label ) . matches ( ) ; label = tlp . basicCategory ( label ) ; if ( anytemp && temporalAnnotation == TEMPORAL_ANY_TMP_PERCOLATED ) { label += "-TMP" ; } else if ( pptemp && ( temporalAnnotation == TEMPORAL_ALL_NP_AND_PP || temporalAnnotation == TEMPORAL_NP_AND_PP_WITH_NP_HEAD || temporalAnnotation == TEMPORAL_ALL_NP_EVEN_UNDER_PP || temporalAnnotation == TEMPORAL_ALL_NP_PP_ADVP || temporalAnnotation == TEMPORAL_9 ) ) { label = label + "-TMP" ; } else if ( advptemp && ( temporalAnnotation == TEMPORAL_ALL_NP_PP_ADVP || temporalAnnotation == TEMPORAL_9 ) ) { label = label + "-TMP" ; } else if ( temporalAnnotation > 0 && nptemp ) { label = label + "-TMP" ; } if ( doAdverbialNP && npadv ) { label = label + "-ADV" ; } if ( doSGappedStuff && subj ) { label = label + "-SBJ" ; } return label ; } }
|
Remove things like hyphened functional tags and equals from the end of a node label .
|
3,652
|
private void addTMP9 ( final Tree tree ) { Tree ht = headFinder . determineHead ( tree ) ; if ( ht . value ( ) . equals ( "POS" ) ) { int j = tree . indexOf ( ht ) ; if ( j > 0 ) { ht = tree . getChild ( j - 1 ) ; } } if ( ht . isPreTerminal ( ) || ht . value ( ) . startsWith ( "NP" ) || ht . value ( ) . startsWith ( "PP" ) || ht . value ( ) . startsWith ( "ADVP" ) ) { if ( ! TmpPattern . matcher ( ht . value ( ) ) . matches ( ) ) { LabelFactory lf = ht . labelFactory ( ) ; ht . setLabel ( lf . newLabel ( ht . value ( ) + "-TMP" ) ) ; } if ( ht . value ( ) . startsWith ( "NP" ) || ht . value ( ) . startsWith ( "PP" ) || ht . value ( ) . startsWith ( "ADVP" ) ) { addTMP9 ( ht ) ; } } Tree [ ] kidlets = tree . children ( ) ; for ( int k = 0 ; k < kidlets . length ; k ++ ) { ht = kidlets [ k ] ; LabelFactory lf ; if ( tree . isPrePreTerminal ( ) && ! TmpPattern . matcher ( ht . value ( ) ) . matches ( ) ) { lf = ht . labelFactory ( ) ; ht . setLabel ( lf . newLabel ( ht . value ( ) + "-TMP" ) ) ; } else if ( ht . value ( ) . startsWith ( "NP" ) ) { if ( ! TmpPattern . matcher ( ht . value ( ) ) . matches ( ) ) { lf = ht . labelFactory ( ) ; ht . setLabel ( lf . newLabel ( ht . value ( ) + "-TMP" ) ) ; } addTMP9 ( ht ) ; } } }
|
Add - TMP when not present within an NP
|
3,653
|
public static transformpolicylabel_stats [ ] get ( nitro_service service ) throws Exception { transformpolicylabel_stats obj = new transformpolicylabel_stats ( ) ; transformpolicylabel_stats [ ] response = ( transformpolicylabel_stats [ ] ) obj . stat_resources ( service ) ; return response ; }
|
Use this API to fetch the statistics of all transformpolicylabel_stats resources that are configured on netscaler .
|
3,654
|
public static transformpolicylabel_stats get ( nitro_service service , String labelname ) throws Exception { transformpolicylabel_stats obj = new transformpolicylabel_stats ( ) ; obj . set_labelname ( labelname ) ; transformpolicylabel_stats response = ( transformpolicylabel_stats ) obj . stat_resource ( service ) ; return response ; }
|
Use this API to fetch statistics of transformpolicylabel_stats resource of given name .
|
3,655
|
private void makeUnique ( ) { HashMap < String , ArrayList < MtasToken > > currentPositionTokens = new HashMap < > ( ) ; ArrayList < MtasToken > currentValueTokens ; int currentStartPosition = - 1 ; MtasToken currentToken = null ; for ( Entry < Integer , MtasToken > entry : tokenCollection . entrySet ( ) ) { currentToken = entry . getValue ( ) ; if ( currentToken . getPositionStart ( ) > currentStartPosition ) { currentPositionTokens . clear ( ) ; currentStartPosition = currentToken . getPositionStart ( ) ; } else { if ( currentPositionTokens . containsKey ( currentToken . getValue ( ) ) ) { currentValueTokens = currentPositionTokens . get ( currentToken . getValue ( ) ) ; } else { currentValueTokens = new ArrayList < > ( ) ; currentPositionTokens . put ( currentToken . getValue ( ) , currentValueTokens ) ; } currentValueTokens . add ( currentToken ) ; } } }
|
Make unique .
|
3,656
|
private void checkTokenCollectionIndex ( ) throws MtasParserException { if ( tokenCollectionIndex . size ( ) != tokenCollection . size ( ) ) { MtasToken token ; Integer maxId = null ; Integer minId = null ; tokenCollectionIndex . clear ( ) ; for ( Entry < Integer , MtasToken > entry : tokenCollection . entrySet ( ) ) { token = entry . getValue ( ) ; maxId = ( ( maxId == null ) ? entry . getKey ( ) : Math . max ( maxId , entry . getKey ( ) ) ) ; minId = ( ( minId == null ) ? entry . getKey ( ) : Math . min ( minId , entry . getKey ( ) ) ) ; if ( token . getId ( ) == null ) { throw new MtasParserException ( "no id for token (" + token . getValue ( ) + ")" ) ; } else if ( ( token . getPositionStart ( ) == null ) || ( token . getPositionEnd ( ) == null ) ) { throw new MtasParserException ( "no position for token with id " + token . getId ( ) + " (" + token . getValue ( ) + ")" ) ; } else if ( token . getValue ( ) == null || ( token . getValue ( ) . equals ( "" ) ) ) { throw new MtasParserException ( "no value for token with id " + token . getId ( ) ) ; } else if ( token . getPrefix ( ) == null || ( token . getPrefix ( ) . equals ( "" ) ) ) { throw new MtasParserException ( "no prefix for token with id " + token . getId ( ) ) ; } else if ( ( token . getParentId ( ) != null ) && ! tokenCollection . containsKey ( token . getParentId ( ) ) ) { throw new MtasParserException ( "missing parentId for token with id " + token . getId ( ) ) ; } else if ( ( token . getOffsetStart ( ) == null ) || ( token . getOffsetEnd ( ) == null ) ) { throw new MtasParserException ( "missing offset for token with id " + token . getId ( ) + " (" + token . getValue ( ) + ")" ) ; } tokenCollectionIndex . add ( entry . getKey ( ) ) ; } if ( ( tokenCollection . size ( ) > 0 ) && ( ( minId > 0 ) || ( ( 1 + maxId - minId ) != tokenCollection . size ( ) ) ) ) { throw new MtasParserException ( "missing ids" ) ; } Collections . sort ( tokenCollectionIndex , getCompByName ( ) ) ; } }
|
Check token collection index .
|
3,657
|
public Comparator < Integer > getCompByName ( ) { return new Comparator < Integer > ( ) { public int compare ( Integer t1 , Integer t2 ) { Integer p1 = tokenCollection . get ( t1 ) . getPositionStart ( ) ; Integer p2 = tokenCollection . get ( t2 ) . getPositionStart ( ) ; assert p1 != null : "no position for " + tokenCollection . get ( t1 ) ; assert p2 != null : "no position for " + tokenCollection . get ( t2 ) ; if ( p1 . equals ( p2 ) ) { Integer o1 = tokenCollection . get ( t1 ) . getOffsetStart ( ) ; Integer o2 = tokenCollection . get ( t2 ) . getOffsetStart ( ) ; if ( o1 != null && o2 != null ) { if ( o1 . equals ( o2 ) ) { return tokenCollection . get ( t1 ) . getValue ( ) . compareTo ( tokenCollection . get ( t2 ) . getValue ( ) ) ; } else { return o1 . compareTo ( o2 ) ; } } else { return tokenCollection . get ( t1 ) . getValue ( ) . compareTo ( tokenCollection . get ( t2 ) . getValue ( ) ) ; } } return p1 . compareTo ( p2 ) ; } } ; }
|
Gets the comp by name .
|
3,658
|
public final void updateKey ( String key ) throws IOException { Objects . requireNonNull ( key , "old key required" ) ; if ( index . containsKey ( key ) ) { MtasSolrStatus status = index . get ( key ) ; index . remove ( key ) ; if ( ! index . containsKey ( status . key ( ) ) ) { index . put ( status . key ( ) , status ) ; } else { throw new IOException ( "key already exists" ) ; } } }
|
Update key .
|
3,659
|
public SimpleOrderedMap < Object > createListOutput ( boolean shardRequests , int maxNumber ) { garbageCollect ( ) ; SimpleOrderedMap < Object > output = new SimpleOrderedMap < > ( ) ; output . add ( NAME_ENABLED , enabled ( ) ) ; output . add ( NAME_ENABLED , true ) ; int numberTotal = data . size ( ) ; ListData listData = new ListData ( ) ; synchronized ( data ) { ListIterator < MtasSolrStatus > iter = data . listIterator ( data . size ( ) ) ; MtasSolrStatus item ; int number = 0 ; while ( iter . hasPrevious ( ) && number < maxNumber ) { item = iter . previous ( ) ; if ( item . shardRequest ( ) ) { listData . addShardRequest ( ) ; if ( shardRequests ) { listData . outputList . add ( item . createItemOutput ( ) ) ; number ++ ; } } else { listData . addNormal ( ) ; listData . outputList . add ( item . createItemOutput ( ) ) ; number ++ ; } } } output . add ( NAME_SIZE_TOTAL , numberTotal ) ; output . add ( NAME_SIZE_NORMAL , listData . numberNormal ) ; output . add ( NAME_SIZE_SHARDREQUESTS , listData . numberShardRequests ) ; output . add ( NAME_LIST , listData . outputList ) ; return output ; }
|
Creates the list output .
|
3,660
|
public static tmtrafficpolicy_binding get ( nitro_service service , String name ) throws Exception { tmtrafficpolicy_binding obj = new tmtrafficpolicy_binding ( ) ; obj . set_name ( name ) ; tmtrafficpolicy_binding response = ( tmtrafficpolicy_binding ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch tmtrafficpolicy_binding resource of given name .
|
3,661
|
public static dnsglobal_dnspolicy_binding [ ] get ( nitro_service service ) throws Exception { dnsglobal_dnspolicy_binding obj = new dnsglobal_dnspolicy_binding ( ) ; dnsglobal_dnspolicy_binding response [ ] = ( dnsglobal_dnspolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch a dnsglobal_dnspolicy_binding resources .
|
3,662
|
public static dnspolicy_binding get ( nitro_service service , String name ) throws Exception { dnspolicy_binding obj = new dnspolicy_binding ( ) ; obj . set_name ( name ) ; dnspolicy_binding response = ( dnspolicy_binding ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch dnspolicy_binding resource of given name .
|
3,663
|
public static gslbservice_lbmonitor_binding [ ] get ( nitro_service service , String servicename ) throws Exception { gslbservice_lbmonitor_binding obj = new gslbservice_lbmonitor_binding ( ) ; obj . set_servicename ( servicename ) ; gslbservice_lbmonitor_binding response [ ] = ( gslbservice_lbmonitor_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch gslbservice_lbmonitor_binding resources of given name .
|
3,664
|
public static base_response add ( nitro_service client , nstcpprofile resource ) throws Exception { nstcpprofile addresource = new nstcpprofile ( ) ; addresource . name = resource . name ; addresource . ws = resource . ws ; addresource . sack = resource . sack ; addresource . wsval = resource . wsval ; addresource . nagle = resource . nagle ; addresource . ackonpush = resource . ackonpush ; addresource . mss = resource . mss ; addresource . maxburst = resource . maxburst ; addresource . initialcwnd = resource . initialcwnd ; addresource . delayedack = resource . delayedack ; addresource . oooqsize = resource . oooqsize ; addresource . maxpktpermss = resource . maxpktpermss ; addresource . pktperretx = resource . pktperretx ; addresource . minrto = resource . minrto ; addresource . slowstartincr = resource . slowstartincr ; addresource . buffersize = resource . buffersize ; addresource . syncookie = resource . syncookie ; addresource . kaprobeupdatelastactivity = resource . kaprobeupdatelastactivity ; addresource . flavor = resource . flavor ; addresource . dynamicreceivebuffering = resource . dynamicreceivebuffering ; addresource . ka = resource . ka ; addresource . kaconnidletime = resource . kaconnidletime ; addresource . kamaxprobes = resource . kamaxprobes ; addresource . kaprobeinterval = resource . kaprobeinterval ; addresource . sendbuffsize = resource . sendbuffsize ; addresource . mptcp = resource . mptcp ; addresource . establishclientconn = resource . establishclientconn ; return addresource . add_resource ( client ) ; }
|
Use this API to add nstcpprofile .
|
3,665
|
public static base_response update ( nitro_service client , nstcpprofile resource ) throws Exception { nstcpprofile updateresource = new nstcpprofile ( ) ; updateresource . name = resource . name ; updateresource . ws = resource . ws ; updateresource . sack = resource . sack ; updateresource . wsval = resource . wsval ; updateresource . nagle = resource . nagle ; updateresource . ackonpush = resource . ackonpush ; updateresource . mss = resource . mss ; updateresource . maxburst = resource . maxburst ; updateresource . initialcwnd = resource . initialcwnd ; updateresource . delayedack = resource . delayedack ; updateresource . oooqsize = resource . oooqsize ; updateresource . maxpktpermss = resource . maxpktpermss ; updateresource . pktperretx = resource . pktperretx ; updateresource . minrto = resource . minrto ; updateresource . slowstartincr = resource . slowstartincr ; updateresource . buffersize = resource . buffersize ; updateresource . syncookie = resource . syncookie ; updateresource . kaprobeupdatelastactivity = resource . kaprobeupdatelastactivity ; updateresource . flavor = resource . flavor ; updateresource . dynamicreceivebuffering = resource . dynamicreceivebuffering ; updateresource . ka = resource . ka ; updateresource . kaconnidletime = resource . kaconnidletime ; updateresource . kamaxprobes = resource . kamaxprobes ; updateresource . kaprobeinterval = resource . kaprobeinterval ; updateresource . sendbuffsize = resource . sendbuffsize ; updateresource . mptcp = resource . mptcp ; updateresource . establishclientconn = resource . establishclientconn ; return updateresource . update_resource ( client ) ; }
|
Use this API to update nstcpprofile .
|
3,666
|
public static base_responses update ( nitro_service client , nstcpprofile resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { nstcpprofile updateresources [ ] = new nstcpprofile [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new nstcpprofile ( ) ; updateresources [ i ] . name = resources [ i ] . name ; updateresources [ i ] . ws = resources [ i ] . ws ; updateresources [ i ] . sack = resources [ i ] . sack ; updateresources [ i ] . wsval = resources [ i ] . wsval ; updateresources [ i ] . nagle = resources [ i ] . nagle ; updateresources [ i ] . ackonpush = resources [ i ] . ackonpush ; updateresources [ i ] . mss = resources [ i ] . mss ; updateresources [ i ] . maxburst = resources [ i ] . maxburst ; updateresources [ i ] . initialcwnd = resources [ i ] . initialcwnd ; updateresources [ i ] . delayedack = resources [ i ] . delayedack ; updateresources [ i ] . oooqsize = resources [ i ] . oooqsize ; updateresources [ i ] . maxpktpermss = resources [ i ] . maxpktpermss ; updateresources [ i ] . pktperretx = resources [ i ] . pktperretx ; updateresources [ i ] . minrto = resources [ i ] . minrto ; updateresources [ i ] . slowstartincr = resources [ i ] . slowstartincr ; updateresources [ i ] . buffersize = resources [ i ] . buffersize ; updateresources [ i ] . syncookie = resources [ i ] . syncookie ; updateresources [ i ] . kaprobeupdatelastactivity = resources [ i ] . kaprobeupdatelastactivity ; updateresources [ i ] . flavor = resources [ i ] . flavor ; updateresources [ i ] . dynamicreceivebuffering = resources [ i ] . dynamicreceivebuffering ; updateresources [ i ] . ka = resources [ i ] . ka ; updateresources [ i ] . kaconnidletime = resources [ i ] . kaconnidletime ; updateresources [ i ] . kamaxprobes = resources [ i ] . kamaxprobes ; updateresources [ i ] . kaprobeinterval = resources [ i ] . kaprobeinterval ; updateresources [ i ] . sendbuffsize = resources [ i ] . sendbuffsize ; updateresources [ i ] . mptcp = resources [ i ] . mptcp ; updateresources [ i ] . establishclientconn = resources [ i ] . establishclientconn ; } result = update_bulk_request ( client , updateresources ) ; } return result ; }
|
Use this API to update nstcpprofile resources .
|
3,667
|
public static nstcpprofile [ ] get ( nitro_service service ) throws Exception { nstcpprofile obj = new nstcpprofile ( ) ; nstcpprofile [ ] response = ( nstcpprofile [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the nstcpprofile resources that are configured on netscaler .
|
3,668
|
public static nstcpprofile get ( nitro_service service , String name ) throws Exception { nstcpprofile obj = new nstcpprofile ( ) ; obj . set_name ( name ) ; nstcpprofile response = ( nstcpprofile ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch nstcpprofile resource of given name .
|
3,669
|
public static transformglobal_transformpolicy_binding [ ] get ( nitro_service service ) throws Exception { transformglobal_transformpolicy_binding obj = new transformglobal_transformpolicy_binding ( ) ; transformglobal_transformpolicy_binding response [ ] = ( transformglobal_transformpolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch a transformglobal_transformpolicy_binding resources .
|
3,670
|
public static bridge_stats get ( nitro_service service ) throws Exception { bridge_stats obj = new bridge_stats ( ) ; bridge_stats [ ] response = ( bridge_stats [ ] ) obj . stat_resources ( service ) ; return response [ 0 ] ; }
|
Use this API to fetch the statistics of all bridge_stats resources that are configured on netscaler .
|
3,671
|
public static systementity [ ] get ( nitro_service service , systementity_args args ) throws Exception { systementity obj = new systementity ( ) ; options option = new options ( ) ; option . set_args ( nitro_util . object_to_string_withoutquotes ( args ) ) ; systementity [ ] response = ( systementity [ ] ) obj . get_resources ( service , option ) ; return response ; }
|
Use this API to fetch all the systementity resources that are configured on netscaler . This uses systementity_args which is a way to provide additional arguments while fetching the resources .
|
3,672
|
public static vpnglobal_vpnclientlessaccesspolicy_binding [ ] get ( nitro_service service ) throws Exception { vpnglobal_vpnclientlessaccesspolicy_binding obj = new vpnglobal_vpnclientlessaccesspolicy_binding ( ) ; vpnglobal_vpnclientlessaccesspolicy_binding response [ ] = ( vpnglobal_vpnclientlessaccesspolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch a vpnglobal_vpnclientlessaccesspolicy_binding resources .
|
3,673
|
public static vpnglobal_vpnclientlessaccesspolicy_binding [ ] get_filtered ( nitro_service service , filtervalue [ ] filter ) throws Exception { vpnglobal_vpnclientlessaccesspolicy_binding obj = new vpnglobal_vpnclientlessaccesspolicy_binding ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; vpnglobal_vpnclientlessaccesspolicy_binding [ ] response = ( vpnglobal_vpnclientlessaccesspolicy_binding [ ] ) obj . getfiltered ( service , option ) ; return response ; }
|
Use this API to fetch filtered set of vpnglobal_vpnclientlessaccesspolicy_binding resources . set the filter parameter values in filtervalue object .
|
3,674
|
public static vrid_interface_binding [ ] get ( nitro_service service , Long id ) throws Exception { vrid_interface_binding obj = new vrid_interface_binding ( ) ; obj . set_id ( id ) ; vrid_interface_binding response [ ] = ( vrid_interface_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch vrid_interface_binding resources of given name .
|
3,675
|
public static Tree CCtransform ( Tree t ) { boolean notDone = true ; while ( notDone ) { Tree cc = findCCparent ( t , t ) ; if ( cc != null ) { t = cc ; } else { notDone = false ; } } return t ; }
|
Transforms t if it contains a coordination in a flat structure
|
3,676
|
public static vpnvserver_authenticationtacacspolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { vpnvserver_authenticationtacacspolicy_binding obj = new vpnvserver_authenticationtacacspolicy_binding ( ) ; obj . set_name ( name ) ; vpnvserver_authenticationtacacspolicy_binding response [ ] = ( vpnvserver_authenticationtacacspolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch vpnvserver_authenticationtacacspolicy_binding resources of given name .
|
3,677
|
public static base_response add ( nitro_service client , ipsecprofile resource ) throws Exception { ipsecprofile addresource = new ipsecprofile ( ) ; addresource . name = resource . name ; addresource . ikeversion = resource . ikeversion ; addresource . encalgo = resource . encalgo ; addresource . hashalgo = resource . hashalgo ; addresource . lifetime = resource . lifetime ; addresource . psk = resource . psk ; addresource . publickey = resource . publickey ; addresource . privatekey = resource . privatekey ; addresource . peerpublickey = resource . peerpublickey ; addresource . livenesscheckinterval = resource . livenesscheckinterval ; addresource . replaywindowsize = resource . replaywindowsize ; addresource . ikeretryinterval = resource . ikeretryinterval ; addresource . retransmissiontime = resource . retransmissiontime ; return addresource . add_resource ( client ) ; }
|
Use this API to add ipsecprofile .
|
3,678
|
public static base_responses add ( nitro_service client , ipsecprofile resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { ipsecprofile addresources [ ] = new ipsecprofile [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new ipsecprofile ( ) ; addresources [ i ] . name = resources [ i ] . name ; addresources [ i ] . ikeversion = resources [ i ] . ikeversion ; addresources [ i ] . encalgo = resources [ i ] . encalgo ; addresources [ i ] . hashalgo = resources [ i ] . hashalgo ; addresources [ i ] . lifetime = resources [ i ] . lifetime ; addresources [ i ] . psk = resources [ i ] . psk ; addresources [ i ] . publickey = resources [ i ] . publickey ; addresources [ i ] . privatekey = resources [ i ] . privatekey ; addresources [ i ] . peerpublickey = resources [ i ] . peerpublickey ; addresources [ i ] . livenesscheckinterval = resources [ i ] . livenesscheckinterval ; addresources [ i ] . replaywindowsize = resources [ i ] . replaywindowsize ; addresources [ i ] . ikeretryinterval = resources [ i ] . ikeretryinterval ; addresources [ i ] . retransmissiontime = resources [ i ] . retransmissiontime ; } result = add_bulk_request ( client , addresources ) ; } return result ; }
|
Use this API to add ipsecprofile resources .
|
3,679
|
public static ipsecprofile [ ] get ( nitro_service service ) throws Exception { ipsecprofile obj = new ipsecprofile ( ) ; ipsecprofile [ ] response = ( ipsecprofile [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the ipsecprofile resources that are configured on netscaler .
|
3,680
|
public static ipsecprofile get ( nitro_service service , String name ) throws Exception { ipsecprofile obj = new ipsecprofile ( ) ; obj . set_name ( name ) ; ipsecprofile response = ( ipsecprofile ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch ipsecprofile resource of given name .
|
3,681
|
public static base_response add ( nitro_service client , authenticationauthnprofile resource ) throws Exception { authenticationauthnprofile addresource = new authenticationauthnprofile ( ) ; addresource . name = resource . name ; addresource . authnvsname = resource . authnvsname ; addresource . authenticationhost = resource . authenticationhost ; addresource . authenticationdomain = resource . authenticationdomain ; addresource . authenticationlevel = resource . authenticationlevel ; return addresource . add_resource ( client ) ; }
|
Use this API to add authenticationauthnprofile .
|
3,682
|
public static base_responses add ( nitro_service client , authenticationauthnprofile resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { authenticationauthnprofile addresources [ ] = new authenticationauthnprofile [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new authenticationauthnprofile ( ) ; addresources [ i ] . name = resources [ i ] . name ; addresources [ i ] . authnvsname = resources [ i ] . authnvsname ; addresources [ i ] . authenticationhost = resources [ i ] . authenticationhost ; addresources [ i ] . authenticationdomain = resources [ i ] . authenticationdomain ; addresources [ i ] . authenticationlevel = resources [ i ] . authenticationlevel ; } result = add_bulk_request ( client , addresources ) ; } return result ; }
|
Use this API to add authenticationauthnprofile resources .
|
3,683
|
public static base_response update ( nitro_service client , authenticationauthnprofile resource ) throws Exception { authenticationauthnprofile updateresource = new authenticationauthnprofile ( ) ; updateresource . name = resource . name ; updateresource . authnvsname = resource . authnvsname ; updateresource . authenticationhost = resource . authenticationhost ; updateresource . authenticationdomain = resource . authenticationdomain ; updateresource . authenticationlevel = resource . authenticationlevel ; return updateresource . update_resource ( client ) ; }
|
Use this API to update authenticationauthnprofile .
|
3,684
|
public static base_responses update ( nitro_service client , authenticationauthnprofile resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { authenticationauthnprofile updateresources [ ] = new authenticationauthnprofile [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new authenticationauthnprofile ( ) ; updateresources [ i ] . name = resources [ i ] . name ; updateresources [ i ] . authnvsname = resources [ i ] . authnvsname ; updateresources [ i ] . authenticationhost = resources [ i ] . authenticationhost ; updateresources [ i ] . authenticationdomain = resources [ i ] . authenticationdomain ; updateresources [ i ] . authenticationlevel = resources [ i ] . authenticationlevel ; } result = update_bulk_request ( client , updateresources ) ; } return result ; }
|
Use this API to update authenticationauthnprofile resources .
|
3,685
|
public static authenticationauthnprofile [ ] get ( nitro_service service ) throws Exception { authenticationauthnprofile obj = new authenticationauthnprofile ( ) ; authenticationauthnprofile [ ] response = ( authenticationauthnprofile [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the authenticationauthnprofile resources that are configured on netscaler .
|
3,686
|
public static authenticationauthnprofile get ( nitro_service service , String name ) throws Exception { authenticationauthnprofile obj = new authenticationauthnprofile ( ) ; obj . set_name ( name ) ; authenticationauthnprofile response = ( authenticationauthnprofile ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch authenticationauthnprofile resource of given name .
|
3,687
|
public static tmsessionpolicy [ ] get ( nitro_service service ) throws Exception { tmsessionpolicy obj = new tmsessionpolicy ( ) ; tmsessionpolicy [ ] response = ( tmsessionpolicy [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the tmsessionpolicy resources that are configured on netscaler .
|
3,688
|
public static tmsessionpolicy get ( nitro_service service , String name ) throws Exception { tmsessionpolicy obj = new tmsessionpolicy ( ) ; obj . set_name ( name ) ; tmsessionpolicy response = ( tmsessionpolicy ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch tmsessionpolicy resource of given name .
|
3,689
|
public void schedule ( TimerTask task , boolean checkIfAlreadyPresent ) { final TimerTaskData taskData = task . getData ( ) ; final Serializable taskID = taskData . getTaskID ( ) ; task . setScheduler ( this ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Scheduling task with id " + taskID ) ; } final TimerTaskCacheData timerTaskCacheData = new TimerTaskCacheData ( taskID , baseFqn , cluster ) ; if ( timerTaskCacheData . create ( ) ) { timerTaskCacheData . setTaskData ( taskData ) ; } else if ( checkIfAlreadyPresent ) { throw new IllegalStateException ( "timer task " + taskID + " already scheduled" ) ; } final SetTimerAfterTxCommitRunnable setTimerAction = new SetTimerAfterTxCommitRunnable ( task , this ) ; if ( txManager != null ) { try { Transaction tx = txManager . getTransaction ( ) ; if ( tx != null ) { TransactionContext txContext = TransactionContextThreadLocal . getTransactionContext ( ) ; if ( txContext == null ) { txContext = new TransactionContext ( ) ; tx . registerSynchronization ( new TransactionSynchronization ( txContext ) ) ; } txContext . put ( taskID , setTimerAction ) ; task . setSetTimerTransactionalAction ( setTimerAction ) ; } else { setTimerAction . run ( ) ; } } catch ( Throwable e ) { remove ( taskID , true ) ; throw new RuntimeException ( "Unable to register tx synchronization object" , e ) ; } } else { setTimerAction . run ( ) ; } }
|
Schedules the specified task .
|
3,690
|
public TimerTask cancel ( Serializable taskID ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Canceling task with timer id " + taskID ) ; } TimerTask task = localRunningTasks . get ( taskID ) ; if ( task != null ) { new TimerTaskCacheData ( taskID , baseFqn , cluster ) . remove ( ) ; final SetTimerAfterTxCommitRunnable setAction = task . getSetTimerTransactionalAction ( ) ; if ( setAction != null ) { setAction . cancel ( ) ; } else { AfterTxCommitRunnable runnable = new CancelTimerAfterTxCommitRunnable ( task , this ) ; if ( txManager != null ) { try { Transaction tx = txManager . getTransaction ( ) ; if ( tx != null ) { TransactionContext txContext = TransactionContextThreadLocal . getTransactionContext ( ) ; if ( txContext == null ) { txContext = new TransactionContext ( ) ; tx . registerSynchronization ( new TransactionSynchronization ( txContext ) ) ; } txContext . put ( taskID , runnable ) ; } else { runnable . run ( ) ; } } catch ( Throwable e ) { throw new RuntimeException ( "Unable to register tx synchronization object" , e ) ; } } else { runnable . run ( ) ; } } } else { if ( txManager != null ) { try { Transaction tx = txManager . getTransaction ( ) ; if ( tx != null ) { TransactionContext txContext = TransactionContextThreadLocal . getTransactionContext ( ) ; if ( txContext != null ) { final AfterTxCommitRunnable r = txContext . remove ( taskID ) ; if ( r != null ) { task = r . task ; new TimerTaskCacheData ( taskID , baseFqn , cluster ) . remove ( ) ; } } } } catch ( Throwable e ) { throw new RuntimeException ( "Failed to check tx context." , e ) ; } } } return task ; }
|
Cancels a local running task with the specified ID .
|
3,691
|
private void recover ( TimerTaskData taskData ) { TimerTask task = timerTaskFactory . newTimerTask ( taskData ) ; if ( task != null ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Recovering task with id " + taskData . getTaskID ( ) ) ; } task . beforeRecover ( ) ; schedule ( task , false ) ; } }
|
Recovers a timer task that was running in another node .
|
3,692
|
public static transformprofile_binding get ( nitro_service service , String name ) throws Exception { transformprofile_binding obj = new transformprofile_binding ( ) ; obj . set_name ( name ) ; transformprofile_binding response = ( transformprofile_binding ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch transformprofile_binding resource of given name .
|
3,693
|
public static base_response add ( nitro_service client , nslimitidentifier resource ) throws Exception { nslimitidentifier addresource = new nslimitidentifier ( ) ; addresource . limitidentifier = resource . limitidentifier ; addresource . threshold = resource . threshold ; addresource . timeslice = resource . timeslice ; addresource . mode = resource . mode ; addresource . limittype = resource . limittype ; addresource . selectorname = resource . selectorname ; addresource . maxbandwidth = resource . maxbandwidth ; addresource . trapsintimeslice = resource . trapsintimeslice ; return addresource . add_resource ( client ) ; }
|
Use this API to add nslimitidentifier .
|
3,694
|
public static base_responses add ( nitro_service client , nslimitidentifier resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { nslimitidentifier addresources [ ] = new nslimitidentifier [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new nslimitidentifier ( ) ; addresources [ i ] . limitidentifier = resources [ i ] . limitidentifier ; addresources [ i ] . threshold = resources [ i ] . threshold ; addresources [ i ] . timeslice = resources [ i ] . timeslice ; addresources [ i ] . mode = resources [ i ] . mode ; addresources [ i ] . limittype = resources [ i ] . limittype ; addresources [ i ] . selectorname = resources [ i ] . selectorname ; addresources [ i ] . maxbandwidth = resources [ i ] . maxbandwidth ; addresources [ i ] . trapsintimeslice = resources [ i ] . trapsintimeslice ; } result = add_bulk_request ( client , addresources ) ; } return result ; }
|
Use this API to add nslimitidentifier resources .
|
3,695
|
public static base_response delete ( nitro_service client , String limitidentifier ) throws Exception { nslimitidentifier deleteresource = new nslimitidentifier ( ) ; deleteresource . limitidentifier = limitidentifier ; return deleteresource . delete_resource ( client ) ; }
|
Use this API to delete nslimitidentifier of given name .
|
3,696
|
public static base_responses delete ( nitro_service client , String limitidentifier [ ] ) throws Exception { base_responses result = null ; if ( limitidentifier != null && limitidentifier . length > 0 ) { nslimitidentifier deleteresources [ ] = new nslimitidentifier [ limitidentifier . length ] ; for ( int i = 0 ; i < limitidentifier . length ; i ++ ) { deleteresources [ i ] = new nslimitidentifier ( ) ; deleteresources [ i ] . limitidentifier = limitidentifier [ i ] ; } result = delete_bulk_request ( client , deleteresources ) ; } return result ; }
|
Use this API to delete nslimitidentifier resources of given names .
|
3,697
|
public static base_response update ( nitro_service client , nslimitidentifier resource ) throws Exception { nslimitidentifier updateresource = new nslimitidentifier ( ) ; updateresource . limitidentifier = resource . limitidentifier ; updateresource . threshold = resource . threshold ; updateresource . timeslice = resource . timeslice ; updateresource . mode = resource . mode ; updateresource . limittype = resource . limittype ; updateresource . selectorname = resource . selectorname ; updateresource . maxbandwidth = resource . maxbandwidth ; updateresource . trapsintimeslice = resource . trapsintimeslice ; return updateresource . update_resource ( client ) ; }
|
Use this API to update nslimitidentifier .
|
3,698
|
public static base_responses update ( nitro_service client , nslimitidentifier resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { nslimitidentifier updateresources [ ] = new nslimitidentifier [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new nslimitidentifier ( ) ; updateresources [ i ] . limitidentifier = resources [ i ] . limitidentifier ; updateresources [ i ] . threshold = resources [ i ] . threshold ; updateresources [ i ] . timeslice = resources [ i ] . timeslice ; updateresources [ i ] . mode = resources [ i ] . mode ; updateresources [ i ] . limittype = resources [ i ] . limittype ; updateresources [ i ] . selectorname = resources [ i ] . selectorname ; updateresources [ i ] . maxbandwidth = resources [ i ] . maxbandwidth ; updateresources [ i ] . trapsintimeslice = resources [ i ] . trapsintimeslice ; } result = update_bulk_request ( client , updateresources ) ; } return result ; }
|
Use this API to update nslimitidentifier resources .
|
3,699
|
public static base_response unset ( nitro_service client , nslimitidentifier resource , String [ ] args ) throws Exception { nslimitidentifier unsetresource = new nslimitidentifier ( ) ; unsetresource . limitidentifier = resource . limitidentifier ; return unsetresource . unset_resource ( client , args ) ; }
|
Use this API to unset the properties of nslimitidentifier resource . Properties that need to be unset are specified in args array .
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.