signature:
public class BinaryRedisClusterClient { /** * Gets the range .
 * @ param key the key
 * @ param startOffset the start offset
 * @ param endOffset the end offset */
public void getrange ( byte [ ] key , long startOffset , long endOffset ) { } }

implementation: sendCommand ( Command . GETRANGE , key , RedisProtocol . toByteArray ( startOffset ) , RedisProtocol . toByteArray ( endOffset ) ) ;


signature:
public class EventSelector { /** * Shutdown a selector
 * @ throws IOException */
public void shutdown ( ) throws IOException { } }

implementation: try { selector . close ( ) ; } catch ( IOException e ) { Logger . error ( "Close nio event selector fail." , e ) ; throw e ; }


signature:
public class EventSelector { /** * Main loop of nio
 * @ return elapsed time */
public ElapsedTime process ( ) { } }

implementation: try { long start = System . currentTimeMillis ( ) ; ioProcess ( ) ; long ioDone = System . currentTimeMillis ( ) ; loopProcess ( ) ; long end = System . currentTimeMillis ( ) ; return new ElapsedTime ( start , ioDone , end ) ; } catch ( Exception e ) { Logger . error ( "-ERR error occurs in hbMain" , e ) ; } return null ;


signature:
public class EventSelector { /** * Demultiplex IO events */
public void ioProcess ( ) { } }

implementation: int numberOfKeys ; try { numberOfKeys = selector . select ( selectTimeout ) ; } catch ( IOException e ) { Logger . error ( "Selector.select error." , e ) ; return ; } if ( 0 == numberOfKeys ) { return ; } Iterator < SelectionKey > keyIter = selector . selectedKeys ( ) . iterator ( ) ; while ( keyIter . hasNext ( ) ) { SelectionKey key = keyIter . next ( ) ; Session session = ( Session ) key . attachment ( ) ; long timeMillis = System . currentTimeMillis ( ) ; try { if ( key . isValid ( ) && key . isReadable ( ) ) { long start = System . currentTimeMillis ( ) ; session . callbackRead ( key , timeMillis ) ; long end = System . currentTimeMillis ( ) ; Statistics . updateNioRead ( end - start ) ; } if ( key . isValid ( ) && key . isWritable ( ) ) { long start = System . currentTimeMillis ( ) ; session . callbackWrite ( key , timeMillis ) ; long end = System . currentTimeMillis ( ) ; Statistics . updateNioWrite ( end - start ) ; } if ( key . isValid ( ) && key . isAcceptable ( ) ) { session . callbackAccept ( key , timeMillis ) ; } if ( key . isValid ( ) && key . isConnectable ( ) ) { session . callbackConnect ( key , timeMillis ) ; } } catch ( CancelledKeyException e ) { Logger . warn ( "Closed connection {}" , session , e ) ; } catch ( ClosedChannelException e ) { Logger . warn ( "Closed connection {}" , session , e ) ; } catch ( IOException e ) { Logger . warn ( "Closed connection {}" , session , e ) ; } catch ( Exception e ) { Logger . error ( "Exception occurs on {}" , session , e ) ; } keyIter . remove ( ) ; }


signature:
public class EventSelector { /** * to be called on each loop to process idle routines . */
public void loopProcess ( ) { } }

implementation: for ( Session session : sessions . values ( ) ) { long timeMillis = System . currentTimeMillis ( ) ; try { session . callbackOnLoop ( timeMillis ) ; } catch ( Exception e ) { Logger . error ( "Exception occurs while callbackOnLoop on {}" , session , e ) ; } }


signature:
public class EventSelector { /** * register session to Selector in order to detect IO events .
 * @ param session
 * @ param ops interest IO operations , such as SelectionKey . OP _ ACCEPT , SelectionKey . OP _ CONNECT , SelectionKey . OP _ READ , SelectionKey . OP _ WRITE
 * @ throws ClosedChannelException */
public void register ( Session session , int ops ) throws ClosedChannelException { } }

implementation: if ( sessions . containsKey ( session . getID ( ) ) ) { throw new IllegalStateException ( "Altready registered session" ) ; } SelectionKey selKey ; try { selKey = session . getChannel ( ) . register ( selector , ops , session ) ; } catch ( ClosedChannelException e ) { Logger . error ( "Error while register channel to selector. {}" , session , e ) ; throw e ; } session . setSelectionKey ( selKey ) ;


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisConnection # closePipeline ( ) */
public List < Object > closePipeline ( ) { } }

implementation: if ( pipeline == null ) { return Collections . emptyList ( ) ; } try { return convertPipelineResults ( ) ; } finally { pipeline . close ( ) ; pipeline = null ; pipelinedResults . clear ( ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisServerCommands # dbSize ( ) */
@ Override public Long dbSize ( ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . dbSize ( ) ) ) ; return null ; } return client . dbSize ( ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisConnectionCommands # ping ( ) */
@ Override public String ping ( ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . ping ( ) ) ) ; return null ; } return client . ping ( ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisKeyCommands # del ( byte [ ] [ ] ) */
@ Override public Long del ( byte [ ] ... keys ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . del ( keys ) ) ) ; return null ; } return client . del ( keys ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisKeyCommands # exists ( byte [ ] ) */
@ Override public Boolean exists ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . exists ( key ) ) ) ; return null ; } return client . exists ( key ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisKeyCommands # expire ( byte [ ] , long ) */
@ Override public Boolean expire ( byte [ ] key , long seconds ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . expire ( key , ( int ) seconds ) , JedisConverters . longToBoolean ( ) ) ) ; return null ; } return JedisConverters . toBoolean ( client . expire ( key , ( int ) seconds ) ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisKeyCommands # expireAt ( byte [ ] , long ) */
@ Override public Boolean expireAt ( byte [ ] key , long unixTime ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . expireAt ( key , unixTime ) , JedisConverters . longToBoolean ( ) ) ) ; return null ; } return JedisConverters . toBoolean ( client . expireAt ( key , unixTime ) ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisKeyCommands # persist ( byte [ ] ) */
@ Override public Boolean persist ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . persist ( key ) , JedisConverters . longToBoolean ( ) ) ) ; return null ; } return JedisConverters . toBoolean ( client . persist ( key ) ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisKeyCommands # type ( byte [ ] ) */
@ Override public DataType type ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . type ( key ) , JedisConverters . stringToDataType ( ) ) ) ; return null ; } return JedisConverters . toDataType ( client . type ( key ) ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisStringCommands # set ( byte [ ] , byte [ ] ) */
@ Override public void set ( byte [ ] key , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisStatusResult ( pipeline . set ( key , value ) ) ) ; return ; } client . set ( key , value ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisStringCommands # getSet ( byte [ ] , byte [ ] ) */
@ Override public byte [ ] getSet ( byte [ ] key , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . getSet ( key , value ) ) ) ; return null ; } return client . getSet ( key , value ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisStringCommands # append ( byte [ ] , byte [ ] ) */
@ Override public Long append ( byte [ ] key , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . append ( key , value ) ) ) ; return null ; } return client . append ( key , value ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisStringCommands # mGet ( byte [ ] [ ] ) */
@ Override public List < byte [ ] > mGet ( byte [ ] ... keys ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . mget ( keys ) ) ) ; return null ; } return client . mget ( keys ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisStringCommands # mSet ( java . util . Map ) */
@ Override public void mSet ( Map < byte [ ] , byte [ ] > tuples ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisStatusResult ( pipeline . mset ( JedisConverters . toByteArrays ( ( tuples ) ) ) ) ) ; return ; } client . mset ( JedisConverters . toByteArrays ( tuples ) ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisStringCommands # setEx ( byte [ ] , long , byte [ ] ) */
@ Override public void setEx ( byte [ ] key , long seconds , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisStatusResult ( pipeline . setex ( key , ( int ) seconds , value ) ) ) ; return ; } client . setex ( key , ( int ) seconds , value ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisStringCommands # setNX ( byte [ ] , byte [ ] ) */
@ Override public Boolean setNX ( byte [ ] key , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . setnx ( key , value ) , JedisConverters . longToBoolean ( ) ) ) ; return null ; } return JedisConverters . toBoolean ( client . setnx ( key , value ) ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisStringCommands # getRange ( byte [ ] , long , long ) */
@ Override public byte [ ] getRange ( byte [ ] key , long start , long end ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . getrange ( key , start , end ) ) ) ; return null ; } return client . getrange ( key , start , end ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisStringCommands # decr ( byte [ ] ) */
@ Override public Long decr ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . decr ( key ) ) ) ; return null ; } return client . decr ( key ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisStringCommands # getBit ( byte [ ] , long ) */
@ Override public Boolean getBit ( byte [ ] key , long offset ) { } }

implementation:
try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . getbit ( key , offset ) ) ) ; return null ; } // compatibility check for RedisCluster 2.0.0
Object getBit = client . getbit ( key , offset ) ; // RedisCluster 2.0
if ( getBit instanceof Long ) { return ( ( ( Long ) getBit ) == 0 ? Boolean . FALSE : Boolean . TRUE ) ; } // RedisCluster 2.1
return ( ( Boolean ) getBit ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisStringCommands # setBit ( byte [ ] , long , boolean ) */
@ Override public Boolean setBit ( byte [ ] key , long offset , boolean value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . setbit ( key , offset , JedisConverters . toBit ( value ) ) ) ) ; return null ; } return client . setbit ( key , offset , JedisConverters . toBit ( value ) ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisStringCommands # setRange ( byte [ ] , byte [ ] , long ) */
@ Override public void setRange ( byte [ ] key , byte [ ] value , long start ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisStatusResult ( pipeline . setrange ( key , start , value ) ) ) ; return ; } client . setrange ( key , start , value ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisStringCommands # strLen ( byte [ ] ) */
@ Override public Long strLen ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . strlen ( key ) ) ) ; return null ; } return client . strlen ( key ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisListCommands # lIndex ( byte [ ] , long ) */
@ Override public byte [ ] lIndex ( byte [ ] key , long index ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . lindex ( key , index ) ) ) ; return null ; } return client . lindex ( key , index ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisListCommands # lInsert ( byte [ ] , org . springframework . data . redis . connection . RedisListCommands . Position , byte [ ] , byte [ ] ) */
@ Override public Long lInsert ( byte [ ] key , Position where , byte [ ] pivot , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . linsert ( key , JedisConverters . toListPosition ( where ) , pivot , value ) ) ) ; return null ; } return client . linsert ( key , JedisConverters . toListPosition ( where ) , pivot , value ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisListCommands # lLen ( byte [ ] ) */
@ Override public Long lLen ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . llen ( key ) ) ) ; return null ; } return client . llen ( key ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisListCommands # lPop ( byte [ ] ) */
@ Override public byte [ ] lPop ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . lpop ( key ) ) ) ; return null ; } return client . lpop ( key ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisListCommands # lRange ( byte [ ] , long , long ) */
@ Override public List < byte [ ] > lRange ( byte [ ] key , long start , long end ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . lrange ( key , start , end ) ) ) ; return null ; } return client . lrange ( key , start , end ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisListCommands # lRem ( byte [ ] , long , byte [ ] ) */
@ Override public Long lRem ( byte [ ] key , long count , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . lrem ( key , count , value ) ) ) ; return null ; } return client . lrem ( key , count , value ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisListCommands # lSet ( byte [ ] , long , byte [ ] ) */
@ Override public void lSet ( byte [ ] key , long index , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisStatusResult ( pipeline . lset ( key , index , value ) ) ) ; return ; } client . lset ( key , index , value ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisListCommands # lTrim ( byte [ ] , long , long ) */
@ Override public void lTrim ( byte [ ] key , long start , long end ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisStatusResult ( pipeline . ltrim ( key , start , end ) ) ) ; return ; } client . ltrim ( key , start , end ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisListCommands # rPop ( byte [ ] ) */
@ Override public byte [ ] rPop ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . rpop ( key ) ) ) ; return null ; } return client . rpop ( key ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisSetCommands # sCard ( byte [ ] ) */
@ Override public Long sCard ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . scard ( key ) ) ) ; return null ; } return client . scard ( key ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisSetCommands # sIsMember ( byte [ ] , byte [ ] ) */
@ Override public Boolean sIsMember ( byte [ ] key , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . sismember ( key , value ) ) ) ; return null ; } return client . sismember ( key , value ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisSetCommands # sMembers ( byte [ ] ) */
@ Override public Set < byte [ ] > sMembers ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . smembers ( key ) ) ) ; return null ; } return client . smembers ( key ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisZSetCommands # zAdd ( byte [ ] , double , byte [ ] ) */
@ Override public Boolean zAdd ( byte [ ] key , double score , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . zadd ( key , score , value ) , JedisConverters . longToBoolean ( ) ) ) ; return null ; } return JedisConverters . toBoolean ( client . zadd ( key , score , value ) ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisZSetCommands # zCard ( byte [ ] ) */
@ Override public Long zCard ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . zcard ( key ) ) ) ; return null ; } return client . zcard ( key ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisZSetCommands # zCount ( byte [ ] , double , double ) */
@ Override public Long zCount ( byte [ ] key , double min , double max ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . zcount ( key , min , max ) ) ) ; return null ; } return client . zcount ( key , min , max ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisZSetCommands # zIncrBy ( byte [ ] , double , byte [ ] ) */
@ Override public Double zIncrBy ( byte [ ] key , double increment , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . zincrby ( key , increment , value ) ) ) ; return null ; } return client . zincrby ( key , increment , value ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisZSetCommands # zRange ( byte [ ] , long , long ) */
@ Override public Set < byte [ ] > zRange ( byte [ ] key , long start , long end ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . zrange ( key , start , end ) ) ) ; return null ; } return client . zrange ( key , start , end ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisZSetCommands # zRevRangeWithScores ( byte [ ] , long , long ) */
@ Override public Set < Tuple > zRevRangeWithScores ( byte [ ] key , long start , long end ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . zrevrangeWithScores ( key , start , end ) , JedisConverters . tupleSetToTupleSet ( ) ) ) ; return null ; } return JedisConverters . toTupleSet ( client . zrevrangeWithScores ( key , start , end ) ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisZSetCommands # zRevRangeByScore ( byte [ ] , double , double , long , long ) */
@ Override public Set < byte [ ] > zRevRangeByScore ( byte [ ] key , double min , double max , long offset , long count ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . zrevrangeByScore ( key , max , min , ( int ) offset , ( int ) count ) ) ) ; return null ; } return client . zrevrangeByScore ( key , max , min , ( int ) offset , ( int ) count ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisZSetCommands # zRevRangeByScoreWithScores ( byte [ ] , double , double ) */
@ Override public Set < Tuple > zRevRangeByScoreWithScores ( byte [ ] key , double min , double max ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . zrevrangeByScoreWithScores ( key , max , min ) , JedisConverters . tupleSetToTupleSet ( ) ) ) ; } return JedisConverters . toTupleSet ( client . zrevrangeByScoreWithScores ( key , max , min ) ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisZSetCommands # zRemRange ( byte [ ] , long , long ) */
@ Override public Long zRemRange ( byte [ ] key , long start , long end ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . zremrangeByRank ( key , start , end ) ) ) ; return null ; } return client . zremrangeByRank ( key , start , end ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisZSetCommands # zRemRangeByScore ( byte [ ] , double , double ) */
@ Override public Long zRemRangeByScore ( byte [ ] key , double min , double max ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . zremrangeByScore ( key , min , max ) ) ) ; return null ; } return client . zremrangeByScore ( key , min , max ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisZSetCommands # zRevRange ( byte [ ] , long , long ) */
@ Override public Set < byte [ ] > zRevRange ( byte [ ] key , long start , long end ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . zrevrange ( key , start , end ) ) ) ; return null ; } return client . zrevrange ( key , start , end ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisZSetCommands # zScore ( byte [ ] , byte [ ] ) */
@ Override public Double zScore ( byte [ ] key , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . zscore ( key , value ) ) ) ; return null ; } return client . zscore ( key , value ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisHashCommands # hSet ( byte [ ] , byte [ ] , byte [ ] ) */
@ Override public Boolean hSet ( byte [ ] key , byte [ ] field , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . hset ( key , field , value ) , JedisConverters . longToBoolean ( ) ) ) ; return null ; } return JedisConverters . toBoolean ( client . hset ( key , field , value ) ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisHashCommands # hExists ( byte [ ] , byte [ ] ) */
@ Override public Boolean hExists ( byte [ ] key , byte [ ] field ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . hexists ( key , field ) ) ) ; return null ; } return client . hexists ( key , field ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisHashCommands # hGet ( byte [ ] , byte [ ] ) */
@ Override public byte [ ] hGet ( byte [ ] key , byte [ ] field ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . hget ( key , field ) ) ) ; return null ; } return client . hget ( key , field ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisHashCommands # hGetAll ( byte [ ] ) */
@ Override public Map < byte [ ] , byte [ ] > hGetAll ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . hgetAll ( key ) ) ) ; return null ; } return client . hgetAll ( key ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisHashCommands # hIncrBy ( byte [ ] , byte [ ] , long ) */
@ Override public Long hIncrBy ( byte [ ] key , byte [ ] field , long delta ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . hincrBy ( key , field , delta ) ) ) ; return null ; } return client . hincrBy ( key , field , delta ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisHashCommands # hKeys ( byte [ ] ) */
@ Override public Set < byte [ ] > hKeys ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . hkeys ( key ) ) ) ; return null ; } return client . hkeys ( key ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisHashCommands # hLen ( byte [ ] ) */
@ Override public Long hLen ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . hlen ( key ) ) ) ; return null ; } return client . hlen ( key ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisHashCommands # hMGet ( byte [ ] , byte [ ] [ ] ) */
@ Override public List < byte [ ] > hMGet ( byte [ ] key , byte [ ] ... fields ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . hmget ( key , fields ) ) ) ; return null ; } return client . hmget ( key , fields ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisHashCommands # hMSet ( byte [ ] , java . util . Map ) */
@ Override public void hMSet ( byte [ ] key , Map < byte [ ] , byte [ ] > tuple ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisStatusResult ( pipeline . hmset ( key , tuple ) ) ) ; return ; } client . hmset ( key , tuple ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisHashCommands # hVals ( byte [ ] ) */
@ Override public List < byte [ ] > hVals ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . hvals ( key ) ) ) ; return null ; } return client . hvals ( key ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see org . springframework . data . redis . connection . RedisServerCommands # info ( ) */
@ Override public Properties info ( ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . info ( ) , JedisConverters . stringToProps ( ) ) ) ; return null ; } return JedisConverters . toProperties ( this . client . info ( ) ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashSetCommands # ssGet ( byte [ ] , byte [ ] , byte [ ] ) */
@ Override public Set < byte [ ] > ssGet ( byte [ ] key , byte [ ] field , byte [ ] name ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . ssget ( key , field , name ) ) ) ; return null ; } return this . client . ssget ( key , field , name ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashSetCommands # ssMGet ( byte [ ] , byte [ ] , byte [ ] [ ] ) */
@ Override public Map < byte [ ] , Set < byte [ ] > > ssMGet ( byte [ ] key , byte [ ] field , byte [ ] ... names ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . ssmget ( key , field , names ) ) ) ; return null ; } return this . client . ssmget ( key , field , names ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashSetCommands # ssKeys ( byte [ ] ) */
@ Override public Set < byte [ ] > ssKeys ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . sskeys ( key ) ) ) ; return null ; } return this . client . sskeys ( key ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashSetCommands # ssAdd ( byte [ ] , byte [ ] , byte [ ] , byte [ ] [ ] ) */
@ Override public Long ssAdd ( byte [ ] key , byte [ ] field , byte [ ] name , byte [ ] ... values ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . ssadd ( key , field , name , values ) ) ) ; return null ; } return this . client . ssadd ( key , field , name , values ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashSetCommands # ssSet ( byte [ ] , byte [ ] , byte [ ] , long , byte [ ] [ ] ) */
@ Override public Long ssSet ( byte [ ] key , byte [ ] field , byte [ ] name , long expireSeconds , byte [ ] ... values ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . ssset ( key , field , name , expireSeconds , values ) ) ) ; return null ; } return this . client . ssset ( key , field , name , expireSeconds , values ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashSetCommands # ssDel ( byte [ ] ) */
@ Override public Long ssDel ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . ssdel ( key ) ) ) ; return null ; } return this . client . ssdel ( key ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashSetCommands # ssRem ( byte [ ] , byte [ ] ) */
@ Override public Long ssRem ( byte [ ] key , byte [ ] field ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . ssrem ( key , field ) ) ) ; return null ; } return this . client . ssrem ( key , field ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashSetCommands # ssCount ( byte [ ] , byte [ ] , byte [ ] ) */
@ Override public Long ssCount ( byte [ ] key , byte [ ] field , byte [ ] name ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . sscount ( key , field , name ) ) ) ; return null ; } return this . client . sscount ( key , field , name ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashSetCommands # ssExists ( byte [ ] , byte [ ] , byte [ ] , byte [ ] ) */
@ Override public Boolean ssExists ( byte [ ] key , byte [ ] field , byte [ ] name , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . ssexists ( key , field , name , value ) ) ) ; return null ; } return this . client . ssexists ( key , field , name , value ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashSetCommands # ssExpire ( byte [ ] , byte [ ] , long ) */
@ Override public Long ssExpire ( byte [ ] key , byte [ ] field , long expireSeconds ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . ssexpire ( key , field , expireSeconds ) ) ) ; return null ; } return this . client . ssexpire ( key , field , expireSeconds ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashSetCommands # ssTTL ( byte [ ] , byte [ ] , byte [ ] , byte [ ] ) */
@ Override public Long ssTTL ( byte [ ] key , byte [ ] field , byte [ ] name , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . ssttl ( key , field , name , value ) ) ) ; return null ; } return this . client . ssttl ( key , field , name , value ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashListCommands # slGet ( byte [ ] , byte [ ] , byte [ ] ) */
@ Override public List < byte [ ] > slGet ( byte [ ] key , byte [ ] field , byte [ ] name ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . slget ( key , field , name ) ) ) ; return null ; } return this . client . slget ( key , field , name ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashListCommands # slMGet ( byte [ ] , byte [ ] , byte [ ] [ ] ) */
@ Override public Map < byte [ ] , List < byte [ ] > > slMGet ( byte [ ] key , byte [ ] field , byte [ ] ... names ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . slmget ( key , field , names ) ) ) ; return null ; } return this . client . slmget ( key , field , names ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashListCommands # slKeys ( byte [ ] , byte [ ] ) */
@ Override public Set < byte [ ] > slKeys ( byte [ ] key , byte [ ] field ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . slkeys ( key , field ) ) ) ; return null ; } return this . client . slkeys ( key , field ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashListCommands # slAdd ( byte [ ] , byte [ ] , byte [ ] , byte [ ] [ ] ) */
@ Override public Long slAdd ( byte [ ] key , byte [ ] field , byte [ ] name , byte [ ] ... values ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . sladd ( key , field , name , values ) ) ) ; return null ; } return this . client . sladd ( key , field , name , values ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashListCommands # slSet ( byte [ ] , byte [ ] , byte [ ] , byte [ ] [ ] ) */
@ Override public Long slSet ( byte [ ] key , byte [ ] field , byte [ ] name , byte [ ] ... values ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . slset ( key , field , name , values ) ) ) ; return null ; } return this . client . slset ( key , field , name , values ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashListCommands # slDel ( byte [ ] ) */
@ Override public Long slDel ( byte [ ] key ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . sldel ( key ) ) ) ; return null ; } return this . client . sldel ( key ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashListCommands # slRem ( byte [ ] , byte [ ] , byte [ ] ) */
@ Override public Long slRem ( byte [ ] key , byte [ ] field , byte [ ] name ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . slrem ( key , field , name ) ) ) ; return null ; } return this . client . slrem ( key , field , name ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashListCommands # slCount ( byte [ ] , byte [ ] , byte [ ] ) */
@ Override public Long slCount ( byte [ ] key , byte [ ] field , byte [ ] name ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . slcount ( key , field , name ) ) ) ; return null ; } return this . client . slcount ( key , field , name ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashListCommands # slExists ( byte [ ] , byte [ ] , byte [ ] , byte [ ] ) */
@ Override public Boolean slExists ( byte [ ] key , byte [ ] field , byte [ ] name , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . slexists ( key , field , name , value ) ) ) ; return null ; } return this . client . slexists ( key , field , name , value ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashListCommands # slExpire ( byte [ ] , long ) */
@ Override public Long slExpire ( byte [ ] key , long expireSeconds ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . slexpire ( key , expireSeconds ) ) ) ; return null ; } return this . client . slexpire ( key , expireSeconds ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class RedisClusterConnection { /** * @ see RedisSessionOfHashListCommands # slTTL ( byte [ ] , byte [ ] , byte [ ] , byte [ ] ) */
@ Override public Long slTTL ( byte [ ] key , byte [ ] field , byte [ ] name , byte [ ] value ) { } }

implementation: try { if ( isPipelined ( ) ) { pipeline ( new JedisResult ( pipeline . slttl ( key , field , name , value ) ) ) ; return null ; } return this . client . slttl ( key , field , name , value ) ; } catch ( Exception ex ) { throw convertException ( ex ) ; }


signature:
public class PartitionGroupServer { /** * Return true , if a master PGS and a slave PGS are in the same machine and
 * both are in the same PG . For instance , If an instance of this class and
 * Master PGS are in the same machine than this function return true ,
 * otherwise return false . */
public boolean isMasterInSameMachine ( ClusterComponentContainer container ) { } }

implementation: final String machineName = persistentData . pmName ; final PhysicalMachineCluster machineInfo = container . getPmc ( machineName , getClusterName ( ) ) ; final List < Integer > localPgsIdList = machineInfo . getPgsIdList ( ) ; for ( final Integer id : localPgsIdList ) { PartitionGroupServer anotherPGS = container . getPgs ( getClusterName ( ) , String . valueOf ( id ) ) ; if ( persistentData . pgId == anotherPGS . persistentData . pgId && anotherPGS . persistentData . role . equals ( PGS_ROLE_MASTER ) && machineName . equals ( anotherPGS . persistentData . pmName ) ) { return true ; } } return false ;


signature:
public class PartitionGroupServer { /** * return List < String > containing [ quorum , nid1 , nid2 , . . . ] */
public List < String > getQuorumV ( ) throws MgmtSmrCommandException { } }

implementation: final String cmd = "getquorumv" ; try { String reply = executeQuery ( cmd ) ; String [ ] toks = reply . split ( " " ) ; if ( ! toks [ 0 ] . equals ( S2C_OK ) ) { final String msg = "getquorumv fail. " + this + ", cmd: " + cmd + ", reply: " + reply ; Logger . error ( msg ) ; throw new MgmtSmrCommandException ( msg ) ; } List < String > ret = new ArrayList < String > ( ) ; for ( int i = 1 ; i < toks . length ; i ++ ) { ret . add ( toks [ i ] ) ; } Logger . info ( "getquorumv success. {}, reply: {}" , this , reply ) ; return ret ; } catch ( IOException e ) { final String msg = "getquorumv fail. " + this + ", cmd: " + cmd + ", exception: " + e . getMessage ( ) ; Logger . warn ( msg ) ; throw new MgmtSmrCommandException ( msg ) ; }


signature:
public class AbstractAnnotationProcessorMojo { /** * TODO remove the part with ToolchainManager lookup once we depend on
 * 3.0.9 ( have it as prerequisite ) . Define as regular component field then .
 * @ param jdkToolchain */
private Toolchain getToolchain ( final Map < String , String > jdkToolchain ) { } }

implementation:
Toolchain tc = null ; if ( jdkToolchain != null && ! jdkToolchain . isEmpty ( ) ) { // Maven 3.3.1 has plugin execution scoped Toolchain Support
try { final Method getToolchainsMethod = toolchainManager . getClass ( ) . getMethod ( "getToolchains" , MavenSession . class , String . class , Map . class ) ; @ SuppressWarnings ( "unchecked" ) final List < Toolchain > tcs = ( List < Toolchain > ) getToolchainsMethod . invoke ( toolchainManager , session , "jdk" , jdkToolchain ) ; if ( tcs != null && tcs . size ( ) > 0 ) { tc = tcs . get ( 0 ) ; } } catch ( Exception e ) { // ignore
} } if ( tc == null ) { tc = toolchainManager . getToolchainFromBuildContext ( "jdk" , session ) ; } return tc ;


signature:
public class ParameterRequestMatcher { /** * Retrieves a parameter ( defined in { @ link # ParameterRequestMatcher ( org . hamcrest . Matcher , java . lang . String ) } )
 * of the given request . The values are percent - encoded .
 * @ param req request to retrieve the parameter from
 * @ return the request parameter as a list of values or { @ code null } if there is no such a parameter in the request */
@ Override protected List < String > retrieveValue ( final Request req ) { } }

implementation: return req . getParameters ( ) . getValues ( this . paramName ) ;


signature:
public class ParameterRequestMatcher { /** * Factory method to create new instance of this matcher .
 * @ param paramName name of a request parameter
 * @ param pred a predicate to be applied on the request parameter
 * @ return new instance of this matcher */
@ Factory public static ParameterRequestMatcher requestParameter ( final String paramName , final Matcher < ? super List < String > > pred ) { } }

implementation: return new ParameterRequestMatcher ( pred , paramName ) ;


signature:
public class JadlerMocker { /** * { @ inheritDoc } */
@ Override public void start ( ) { } }

implementation: if ( this . started ) { throw new IllegalStateException ( "The stub server has been started already." ) ; } logger . debug ( "starting the underlying stub server..." ) ; this . server . registerRequestManager ( this ) ; try { server . start ( ) ; } catch ( final Exception ex ) { throw new JadlerException ( "Stub http server start failure" , ex ) ; } this . started = true ;


signature:
public class JadlerMocker { /** * { @ inheritDoc } */
@ Override public void close ( ) { } }

implementation: if ( ! this . started ) { throw new IllegalStateException ( "The stub server hasn't been started yet." ) ; } logger . debug ( "stopping the underlying stub server..." ) ; try { server . stop ( ) ; } catch ( final Exception ex ) { throw new JadlerException ( "Stub http server shutdown failure" , ex ) ; } this . started = false ;


signature:
public class JadlerMocker { /** * Adds a default header to be added to every stub http response .
 * @ param name header name ( cannot be empty )
 * @ param value header value ( cannot be < tt > null < / tt > ) */
public void addDefaultHeader ( final String name , final String value ) { } }

implementation: Validate . notEmpty ( name , "header name cannot be empty" ) ; Validate . notNull ( value , "header value cannot be null, use an empty string instead" ) ; this . checkConfigurable ( ) ; this . defaultHeaders . put ( name , value ) ;


signature:
public class JadlerMocker { /** * { @ inheritDoc } */
@ Override public RequestStubbing onRequest ( ) { } }

implementation: logger . debug ( "adding new stubbing..." ) ; this . checkConfigurable ( ) ; final Stubbing stubbing = this . stubbingFactory . createStubbing ( defaultEncoding , defaultStatus , defaultHeaders ) ; stubbings . add ( stubbing ) ; return stubbing ;


signature:
public class JadlerMocker { /** * { @ inheritDoc } */
@ Override public StubResponse provideStubResponseFor ( final Request request ) { } }

implementation: synchronized ( this ) { if ( this . configurable ) { this . configurable = false ; this . httpStubs = this . createHttpStubs ( ) ; } if ( this . recordRequests ) { this . receivedRequests . add ( request ) ; } } for ( final Iterator < HttpStub > it = this . httpStubs . descendingIterator ( ) ; it . hasNext ( ) ; ) { final HttpStub rule = it . next ( ) ; if ( rule . matches ( request ) ) { final StringBuilder sb = new StringBuilder ( ) ; sb . append ( "Following rule will be applied:\n" ) ; sb . append ( rule ) ; logger . debug ( sb . toString ( ) ) ; return rule . nextResponse ( request ) ; } } final StringBuilder sb = new StringBuilder ( ) ; sb . append ( "No suitable rule found. Reason:\n" ) ; for ( final HttpStub rule : this . httpStubs ) { sb . append ( "The rule '" ) ; sb . append ( rule ) ; sb . append ( "' cannot be applied. Mismatch:\n" ) ; sb . append ( rule . describeMismatch ( request ) ) ; sb . append ( "\n" ) ; } logger . info ( sb . toString ( ) ) ; return NO_RULE_FOUND_RESPONSE ;


signature:
public class JadlerMocker { /** * { @ inheritDoc } */
@ Deprecated @ Override public int numberOfRequestsMatching ( final Collection < Matcher < ? super Request > > predicates ) { } }

implementation: Validate . notNull ( predicates , "predicates cannot be null" ) ; checkRequestRecording ( ) ; final Matcher < Request > all = allOf ( predicates ) ; int cnt = 0 ; synchronized ( this ) { for ( final Request req : this . receivedRequests ) { if ( all . matches ( req ) ) { cnt ++ ; } } } return cnt ;


signature:
public class JadlerRule { /** * { @ inheritDoc } */
@ Override public JadlerRule withDefaultResponseHeader ( final String name , final String value ) { } }

implementation: this . defaultHeaders = this . defaultHeaders . add ( name , value ) ; return this ;


signature:
public class HttpStub { /** * Returns a reason why the given request doesn ' t match this rule . This method should be called if
 * and only if { @ link # matches ( net . jadler . Request ) } would return { @ code false } . However , this is not checked .
 * @ param request an http request to describe the mismatch for
 * @ return a human readable mismatch reason */
public String describeMismatch ( final Request request ) { } }

implementation: final Description desc = new StringDescription ( ) ; boolean first = true ; for ( final Iterator < Matcher < ? super Request > > it = this . predicates . iterator ( ) ; it . hasNext ( ) ; ) { final Matcher < ? super Request > m = it . next ( ) ; if ( ! m . matches ( request ) ) { if ( ! first ) { desc . appendText ( " AND\n" ) ; } desc . appendText ( "  " ) ; m . describeMismatch ( request , desc ) ; first = false ; } } return desc . toString ( ) ;


signature:
public class Verifying { /** * Checks whether the number of requests described in this verifying object received so far matches the given predicate .
 * @ param nrRequestsPredicate to be applied on the number of requests
 * @ throws VerificationException if the number of requests described by this verifying is not matched by the given
 * predicate */
public void receivedTimes ( final Matcher < Integer > nrRequestsPredicate ) { } }

implementation: Validate . notNull ( nrRequestsPredicate , "predicate cannot be null" ) ; this . requestManager . evaluateVerification ( predicates , nrRequestsPredicate ) ;


signature:
public class HeaderRequestMatcher { /** * Retrieves a header ( defined in { @ link # HeaderRequestMatcher ( org . hamcrest . Matcher , java . lang . String ) } )
 * of the given request .
 * @ param req request to retrieve the header from
 * @ return the request header as a list of values or { @ code null } if there is no such a header in the request */
@ Override protected List < String > retrieveValue ( final Request req ) { } }

implementation: return req . getHeaders ( ) . getValues ( this . headerName ) ;


signature:
public class HeaderRequestMatcher { /** * Factory method to create new instance of this matcher .
 * @ param headerName name of a request header
 * @ param pred a predicate to be applied on the request header
 * @ return new instance of this matcher */
@ Factory public static HeaderRequestMatcher requestHeader ( final String headerName , final Matcher < ? super List < String > > pred ) { } }

implementation: return new HeaderRequestMatcher ( pred , headerName ) ;


signature:
public class AbstractRequestMatching { /** * { @ inheritDoc } */
@ Override @ SuppressWarnings ( "unchecked" ) public T that ( final Matcher < ? super Request > predicate ) { } }

implementation: Validate . notNull ( predicate , "predicate cannot be null" ) ; this . predicates . add ( predicate ) ; return ( T ) this ;


signature:
public class AbstractRequestMatching { /** * { @ inheritDoc } */
@ Override public T havingMethodEqualTo ( final String method ) { } }

implementation: Validate . notEmpty ( method , "method cannot be empty" ) ; return havingMethod ( equalToIgnoringCase ( method ) ) ;


signature:
public class AbstractRequestMatching { /** * { @ inheritDoc } */
@ Override public T havingMethod ( final Matcher < ? super String > predicate ) { } }

implementation: Validate . notNull ( predicate , "predicate cannot be null" ) ; return that ( requestMethod ( predicate ) ) ;


signature:
public class AbstractRequestMatching { /** * { @ inheritDoc } */
@ Override public T havingBodyEqualTo ( final String requestBody ) { } }

implementation: Validate . notNull ( requestBody , "requestBody cannot be null, use an empty string instead" ) ; return havingBody ( equalTo ( requestBody ) ) ;


signature:
public class AbstractRequestMatching { /** * { @ inheritDoc } */
@ Override public T havingBody ( final Matcher < ? super String > predicate ) { } }

implementation: Validate . notNull ( predicate , "predicate cannot be null" ) ; return that ( requestBody ( predicate ) ) ;


signature:
public class AbstractRequestMatching { /** * { @ inheritDoc } */
@ Override public T havingRawBodyEqualTo ( final byte [ ] requestBody ) { } }

implementation: Validate . notNull ( requestBody , "requestBody cannot be null, use an empty array instead" ) ; return that ( requestRawBody ( equalTo ( requestBody ) ) ) ;


signature:
public class AbstractRequestMatching { /** * { @ inheritDoc } */
@ Override public T havingPathEqualTo ( final String path ) { } }

implementation: Validate . notEmpty ( path , "path cannot be empty" ) ; return havingPath ( equalTo ( path ) ) ;


signature:
public class AbstractRequestMatching { /** * { @ inheritDoc } */
@ Override public T havingPath ( final Matcher < ? super String > predicate ) { } }

implementation: Validate . notNull ( predicate , "predicate cannot be null" ) ; return that ( requestPath ( predicate ) ) ;


signature:
public class AbstractRequestMatching { /** * { @ inheritDoc } */
@ Override public T havingQueryString ( final Matcher < ? super String > predicate ) { } }

implementation: Validate . notNull ( predicate , "predicate cannot be null" ) ; return that ( requestQueryString ( predicate ) ) ;


signature:
public class AbstractRequestMatching { /** * { @ inheritDoc } */
@ Override public T havingParameterEqualTo ( final String name , final String value ) { } }

implementation: Validate . notNull ( value , "value cannot be null" ) ; return havingParameter ( name , hasItem ( value ) ) ;


signature:
public class AbstractRequestMatching { /** * { @ inheritDoc } */
@ Override public T havingParameter ( final String name , final Matcher < ? super List < String > > predicate ) { } }

implementation: Validate . notEmpty ( name , "name cannot be empty" ) ; Validate . notNull ( predicate , "predicate cannot be null" ) ; return that ( requestParameter ( name , predicate ) ) ;


signature:
public class AbstractRequestMatching { /** * { @ inheritDoc } */
@ Override @ SuppressWarnings ( "unchecked" ) public T havingParameters ( final String ... names ) { } }

implementation: for ( final String name : names ) { havingParameter ( name ) ; } return ( T ) this ;


signature:
public class AbstractRequestMatching { /** * { @ inheritDoc } */
@ Override public T havingHeaderEqualTo ( final String name , final String value ) { } }

implementation: Validate . notNull ( value , "value cannot be null" ) ; return havingHeader ( name , hasItem ( value ) ) ;


signature:
public class AbstractRequestMatching { /** * { @ inheritDoc } */
@ Override public T havingHeader ( final String name , final Matcher < ? super List < String > > predicate ) { } }

implementation: Validate . notEmpty ( name , "name cannot be empty" ) ; Validate . notNull ( predicate , "predicate cannot be null" ) ; return that ( requestHeader ( name , predicate ) ) ;


signature:
public class AbstractRequestMatching { /** * { @ inheritDoc } */
@ Override @ SuppressWarnings ( "unchecked" ) public T havingHeaders ( final String ... names ) { } }

implementation: Validate . notNull ( names , "names cannot be null" ) ; for ( final String name : names ) { havingHeader ( name ) ; } return ( T ) this ;


signature:
public class KeyValues { /** * Adds new key - value pair . Supports multi - values for one key ( if there has already been added
 * some value with this key , additional value is added instead of rewriting ) . Please note this method
 * creates new instance containing all existing values plus the new one rather than modifying this instance .
 * @ param key key ( cannot be empty )
 * @ param value value ( cannot be { @ code null } , however can be empty for valueless headers )
 * @ return an exact copy of this instance containing all existing values plus the new one */
@ SuppressWarnings ( "unchecked" ) public KeyValues add ( final String key , final String value ) { } }

implementation: Validate . notEmpty ( key , "key cannot be empty" ) ; Validate . notNull ( value , "value cannot be null, use an empty string instead" ) ; final KeyValues res = new KeyValues ( ) ; res . values . putAll ( this . values ) ; res . values . put ( key . toLowerCase ( ) , value ) ; return res ;


signature:
public class KeyValues { /** * Adds all values from the given instance . Supports multi - values for one key ( if there has already been added
 * some value with this key , additional value is added instead of rewriting ) . Please note this method
 * creates new instance containing all existing values plus the new ones rather than modifying this instance .
 * @ param keyValues values to be added no ( cannot be { @ code null } )
 * @ return an exact copy of this instance containing all existing values plus the new ones */
@ SuppressWarnings ( "unchecked" ) public KeyValues addAll ( final KeyValues keyValues ) { } }

implementation: Validate . notNull ( keyValues , "keyValues cannot be null" ) ; final KeyValues res = new KeyValues ( ) ; res . values . putAll ( this . values ) ; res . values . putAll ( keyValues . values ) ; return res ;


signature:
public class KeyValues { /** * Returns the first value for the given key
 * @ param key key ( case insensitive )
 * @ return single ( first ) value for the given key or { @ code null } , if there is no such a key in this instance */
public String getValue ( final String key ) { } }

implementation: Validate . notEmpty ( key , "key cannot be empty" ) ; final List < String > allValues = this . getValues ( key ) ; return allValues != null ? allValues . get ( 0 ) : null ;


signature:
public class KeyValues { /** * Returns all values for the given key
 * @ param key key ( case insensitive )
 * @ return all values of the given header or { @ code null } , if there is no such a key in this instance */
public List < String > getValues ( final String key ) { } }

implementation: Validate . notEmpty ( key , "name cannot be empty" ) ; @ SuppressWarnings ( "unchecked" ) final List < String > result = ( List < String > ) values . get ( key . toLowerCase ( ) ) ; return result == null || result . isEmpty ( ) ? null : new ArrayList < String > ( result ) ;


signature:
public class MutableStubResponse { /** * Removes all occurrences of the given header in this stub response ( using a case insensitive search )
 * and sets its single value .
 * @ param name header name
 * @ param value header value */
@ SuppressWarnings ( "unchecked" ) void setHeaderCaseInsensitive ( final String name , final String value ) { } }

implementation:
final MultiMap result = new MultiValueMap ( ) ; for ( final Object o : this . headers . keySet ( ) ) { final String key = ( String ) o ; // fucking non - generics MultiMap
if ( ! name . equalsIgnoreCase ( key ) ) { // copy all other headers to the result multimap
for ( final String s : ( Collection < String > ) this . headers . get ( o ) ) { result . put ( o , s ) ; } } } this . headers . clear ( ) ; this . headers . putAll ( result ) ; this . addHeader ( name , value ) ;


signature:
public class RequestUtils { /** * package protected for testing purposes */
static void addEncoding ( final Request . Builder builder , final HttpExchange httpExchange ) { } }

implementation:
final String contentType = httpExchange . getRequestHeaders ( ) . getFirst ( "Content-Type" ) ; if ( contentType != null ) { final Matcher matcher = CHARSET_PATTERN . matcher ( contentType ) ; if ( matcher . matches ( ) ) { try { builder . encoding ( Charset . forName ( matcher . group ( 1 ) ) ) ; } catch ( UnsupportedCharsetException e ) { // just ignore , fallback encoding will be used instead
} } }


signature:
public class Jadler { /** * < p > Stops the underlying { @ link StubHttpServer } and closes Jadler . < / p >
 * < p > This should be preferably called in the { @ code tearDown } method of a test suite . < / p > */
public static void closeJadler ( ) { } }

implementation: final StubHttpServerManager serverManager = jadlerMockerContainer . get ( ) ; if ( serverManager != null && serverManager . isStarted ( ) ) { serverManager . close ( ) ; } jadlerMockerContainer . set ( null ) ;


signature:
public class RequestMatcher { /** * { @ inheritDoc } */
@ Override public void describeMismatch ( final Object item , final Description description ) { } }

implementation: final T value ; try { value = this . retrieveValue ( ( Request ) item ) ; } catch ( Exception ex ) { throw new JadlerException ( "An error occurred while retrieving a value from the http request " + "for mismatch description" , ex ) ; } description . appendText ( "REQUIRED: " ) ; description . appendDescriptionOf ( this ) ; description . appendText ( " BUT " ) ; this . pred . describeMismatch ( value , description ) ;


signature:
public class RequestMatcher { /** * { @ inheritDoc } */
@ Override public void describeTo ( final Description description ) { } }

implementation: description . appendText ( this . provideDescription ( ) ) ; description . appendText ( " " ) ; description . appendDescriptionOf ( this . pred ) ;


signature:
public class RequestMatcher { /** * Checks whether the given { @ link Request } object matches this matcher .
 * @ param o { @ link Request } object to be matched by this matcher . If this param is not of type { @ link Request } this
 * method will always return { @ code false } .
 * @ return { @ code true } if the value retrieved using { @ link # retrieveValue ( net . jadler . Request ) } from the given
 * { @ link Request } object matches the predicate registered by the { @ link # RequestMatcher ( org . hamcrest . Matcher ) } ,
 * otherwise { @ code false } . */
@ Override public boolean matches ( final Object o ) { } }

implementation: if ( ! ( o instanceof Request ) ) { return false ; } T value ; try { value = this . retrieveValue ( ( Request ) o ) ; } catch ( final Exception e ) { throw new JadlerException ( "An error occurred while retrieving a value from the http request" , e ) ; } return this . pred . matches ( value ) ;


signature:
public class Stubbing { /** * { @ inheritDoc } */
@ Override public ResponseStubbing thenRespond ( ) { } }

implementation: final MutableStubResponse response = new MutableStubResponse ( ) ; response . addHeaders ( defaultHeaders ) ; response . setStatus ( defaultStatus ) ; response . setEncoding ( defaultEncoding ) ; response . setBody ( "" ) ; stubResponses . add ( response ) ; return this ;


signature:
public class Stubbing { /** * { @ inheritDoc } */
@ Override public ResponseStubbing withBody ( final Reader reader ) { } }

implementation: try { final String responseBody ; try { responseBody = IOUtils . toString ( reader ) ; } catch ( final IOException ex ) { throw new JadlerException ( "An error ocurred while reading the response body from " + "the given Reader instance." , ex ) ; } return this . withBody ( responseBody ) ; } finally { IOUtils . closeQuietly ( reader ) ; }


signature:
public class Stubbing { /** * { @ inheritDoc } */
@ Override public ResponseStubbing withBody ( final InputStream is ) { } }

implementation: try { final byte [ ] responseBody ; try { responseBody = IOUtils . toByteArray ( is ) ; } catch ( final IOException e ) { throw new JadlerException ( "A problem occurred while reading the given input stream" , e ) ; } return this . withBody ( responseBody ) ; } finally { IOUtils . closeQuietly ( is ) ; }


signature:
public class Stubbing { /** * { @ inheritDoc } */
@ Override public ResponseStubbing withHeader ( final String name , final String value ) { } }

implementation: currentResponse ( ) . addHeader ( name , value ) ; return this ;


signature:
public class Stubbing { /** * { @ inheritDoc } */
@ Override public ResponseStubbing withDelay ( long delayValue , TimeUnit delayUnit ) { } }

implementation: currentResponse ( ) . setDelay ( java . util . concurrent . TimeUnit . MILLISECONDS . convert ( delayValue , delayUnit ) ) ; return this ;


signature:
public class Stubbing { /** * Creates a { @ link HttpStub } instance from this Stubbing instance .
 * Must be called once this stubbing has been finished .
 * @ return { @ link HttpStub } instance configured using values from this stubbing */
public HttpStub createRule ( ) { } }

implementation: if ( this . responder != null ) { return new HttpStub ( predicates , this . responder ) ; } final List < StubResponse > res = new ArrayList < StubResponse > ( this . stubResponses . size ( ) ) ; for ( final MutableStubResponse msr : this . stubResponses ) { res . add ( msr . toStubResponse ( ) ) ; } return new HttpStub ( predicates , new StaticResponder ( res ) ) ;


signature:
public class StubbingFactory { /** * Creates new stubbing instance .
 * @ param defaultEncoding default encoding of every stub response body
 * @ param defaultStatus default http status of every stub response
 * @ param defaultHeaders default response headers of every stub response
 * @ return new { @ link Stubbing } instance */
public Stubbing createStubbing ( final Charset defaultEncoding , final int defaultStatus , final MultiMap defaultHeaders ) { } }

implementation: return new Stubbing ( defaultEncoding , defaultStatus , defaultHeaders ) ;


signature:
public class JettyStubHttpServer { /** * { @ inheritDoc } */
@ Override public void registerRequestManager ( final RequestManager ruleProvider ) { } }

implementation: Validate . notNull ( ruleProvider , "ruleProvider cannot be null" ) ; server . setHandler ( new JadlerHandler ( ruleProvider ) ) ;


signature:
public class JWTEncoder { /** * Encode and sign a set of claims .
 * @ param claims
 * @ param secret
 * @ return */
public static String encode ( JSONObject claims , String secret ) { } }

implementation: String encodedHeader = getCommonHeader ( ) ; String encodedClaims = encodeJson ( claims ) ; String secureBits = new StringBuilder ( encodedHeader ) . append ( TOKEN_SEP ) . append ( encodedClaims ) . toString ( ) ; String sig = sign ( secret , secureBits ) ; return new StringBuilder ( secureBits ) . append ( TOKEN_SEP ) . append ( sig ) . toString ( ) ;


signature:
public class TokenOptions { /** * Copies the date , since Date objects are mutable . */
private Date copyDate ( Date date ) { } }

implementation: return ( date != null ) ? new Date ( date . getTime ( ) ) : null ;


signature:
public class TokenGenerator { /** * Create a token for the given object and options .
 * @ param data
 * @ param options
 * @ return */
public String createToken ( Map < String , Object > data , TokenOptions options ) { } }

implementation:
if ( ( data == null || data . size ( ) == 0 ) && ( options == null || ( ! options . isAdmin ( ) && ! options . isDebug ( ) ) ) ) { throw new IllegalArgumentException ( "TokenGenerator.createToken: data is empty and no options are set.  This token will have no effect on Firebase." ) ; } JSONObject claims = new JSONObject ( ) ; try { claims . put ( "v" , TOKEN_VERSION ) ; claims . put ( "iat" , new Date ( ) . getTime ( ) / 1000 ) ; boolean isAdminToken = ( options != null && options . isAdmin ( ) ) ; validateToken ( "TokenGenerator.createToken" , data , isAdminToken ) ; if ( data != null && data . size ( ) > 0 ) { claims . put ( "d" , new JSONObject ( data ) ) ; } // Handle options
if ( options != null ) { if ( options . getExpires ( ) != null ) { claims . put ( "exp" , options . getExpires ( ) . getTime ( ) / 1000 ) ; } if ( options . getNotBefore ( ) != null ) { claims . put ( "nbf" , options . getNotBefore ( ) . getTime ( ) / 1000 ) ; } // Only add these claims if they ' re true to avoid sending them over the wire when false .
if ( options . isAdmin ( ) ) { claims . put ( "admin" , options . isAdmin ( ) ) ; } if ( options . isDebug ( ) ) { claims . put ( "debug" , options . isDebug ( ) ) ; } } } catch ( JSONException e ) { throw new RuntimeException ( e ) ; } String token = computeToken ( claims ) ; if ( token . length ( ) > 1024 ) { throw new IllegalArgumentException ( "TokenGenerator.createToken: Generated token is too long. The token cannot be longer than 1024 bytes." ) ; } return token ;


signature:
public class ExpressionSelector { /** * Helper method for creating an { @ code ExpressionSelector } .
 * @ param expr
 * The expression to parse .
 * @ param beanFactory
 * The { @ link org . springframework . beans . factory . BeanFactory } to use to resolve references in the expression .
 * @ return A new { @ link reactor . bus . selector . Selector } */
public static Selector expressionSelector ( String expr , BeanFactory beanFactory ) { } }

implementation: StandardEvaluationContext evalCtx = new StandardEvaluationContext ( ) ; if ( null != beanFactory ) { evalCtx . setBeanResolver ( new BeanFactoryResolver ( beanFactory ) ) ; } return expressionSelector ( expr , evalCtx ) ;


signature:
public class ExpressionSelector { /** * Helper method for creating an { @ code ExpressionSelector } .
 * @ param expr
 * The expression to parse .
 * @ param evalCtx
 * The { @ link org . springframework . expression . EvaluationContext } to use .
 * @ return A new { @ link reactor . bus . selector . Selector } */
public static Selector expressionSelector ( String expr , EvaluationContext evalCtx ) { } }

implementation: return new ExpressionSelector ( SPEL_PARSER . parseExpression ( expr ) , evalCtx ) ;


signature:
public class ExpressionSelector { /** * Helper method for creating an { @ code ExpressionSelector } .
 * @ param expr
 * The expression to parse .
 * @ param evalCtx
 * The { @ link org . springframework . expression . EvaluationContext } to use .
 * @ param mode
 * The { @ link org . springframework . expression . spel . SpelCompilerMode } to use .
 * @ return A new { @ link reactor . bus . selector . Selector } */
public static Selector expressionSelector ( String expr , EvaluationContext evalCtx , SpelCompilerMode mode ) { } }

implementation: SpelParserConfiguration configuration = new SpelParserConfiguration ( mode , null ) ; SpelExpressionParser parser = new SpelExpressionParser ( configuration ) ; return new ExpressionSelector ( parser . parseExpression ( expr ) , evalCtx ) ;


signature:
public class GoogleAPI { /** * Helper to create a new dialog from an error code .
 * @ param errorCode the code int to explain
 * @ param requestCode the request code to use when you expect the result .
 * @ return a new dialog instance ready to show */
Dialog getErrorDialog ( int errorCode , int requestCode ) { } }

implementation: final Dialog dialog = GoogleApiAvailability . getInstance ( ) . getErrorDialog ( activity , errorCode , requestCode ) ; dialog . setOnDismissListener ( new DialogInterface . OnDismissListener ( ) { @ Override public void onDismiss ( DialogInterface dialogInterface ) { resolvingError = false ; } } ) ; return dialog ;


signature:
public class GoogleAPI { /** * Checks if the Google API Client is connected and tries to request the user Account .
 * @ param signInRequestCode the request code to use when you expect the sign in result .
 * @ param errorResolutionRequestCode the request code to use when you expect the erorr resolution result . */
void connectAndRequestGoogleAccount ( int signInRequestCode , int errorResolutionRequestCode ) { } }

implementation: if ( client . isConnected ( ) ) { requestGoogleAccount ( signInRequestCode ) ; } else if ( ! client . isConnecting ( ) ) { this . signInRequestCode = signInRequestCode ; this . errorResolutionRequestCode = errorResolutionRequestCode ; client . connect ( ) ; }


signature:
public class GoogleAPI { /** * Given the data received in the activity . onActivityResult ( ) call , tries to parse the
 * content to figure out if it ' s an error resolution result or a sign up result .
 * @ param requestCode request code received
 * @ param resultCode result code received
 * @ param intent intent received
 * @ return whether the data was handled by this provider or not . */
boolean parseSignInResult ( int requestCode , int resultCode , Intent intent ) { } }

implementation: if ( requestCode == errorResolutionRequestCode ) { resolvingError = false ; if ( resultCode == Activity . RESULT_OK ) { connectAndRequestGoogleAccount ( signInRequestCode , errorResolutionRequestCode ) ; } return true ; } else if ( requestCode == signInRequestCode ) { if ( resultCode == Activity . RESULT_OK ) { final GoogleSignInResult result = Auth . GoogleSignInApi . getSignInResultFromIntent ( intent ) ; if ( result . isSuccess ( ) ) { googleCallback . onSuccess ( result . getSignInAccount ( ) ) ; } else if ( result . getStatus ( ) . isCanceled ( ) ) { googleCallback . onCancel ( ) ; } } return true ; } return false ;


signature:
public class GoogleAPI { /** * Clears this helper state . After this method is called the provider should not be used . */
public void logoutAndClearState ( ) { } }

implementation: if ( client != null && client . isConnected ( ) ) { logout ( ) ; client . disconnect ( ) ; } activity = null ; client = null ;


signature:
public class GoogleAPI { /** * Logs out the current signed in account . */
void logout ( ) { } }

implementation: try { Auth . GoogleSignInApi . signOut ( client ) . setResultCallback ( new ResultCallback < Status > ( ) { @ Override public void onResult ( @ NonNull Status status ) { if ( ! status . isSuccess ( ) ) { Log . w ( TAG , "Couldn't clear account and credentials" ) ; } } } ) ; } catch ( IllegalStateException e ) { Log . e ( TAG , "Failed to clear the Google Plus Session" , e ) ; }


signature:
public class CloudflareEdgeCache { /** * Invalidation will eventually occur when the TTL expires , so it ' s not a showstopper if this fails . */
@ Override public boolean invalidateIfNecessary ( BaragonRequest request ) { } }

implementation: if ( request . getLoadBalancerService ( ) . getEdgeCacheDomains ( ) . isEmpty ( ) ) { return false ; } try { boolean allSucceeded = true ; for ( String edgeCacheDNS : request . getLoadBalancerService ( ) . getEdgeCacheDomains ( ) ) { List < CloudflareZone > matchingZones = getCloudflareZone ( edgeCacheDNS ) ; if ( matchingZones . isEmpty ( ) ) { LOG . warn ( "`edgeCacheDNS` was defined on the request, but no matching Cloudflare Zone was found!" ) ; return false ; } for ( CloudflareZone matchingZone : matchingZones ) { String zoneId = matchingZone . getId ( ) ; Optional < CloudflareDnsRecord > matchingDnsRecord = getCloudflareDnsRecord ( edgeCacheDNS , zoneId ) ; if ( ! matchingDnsRecord . isPresent ( ) ) { LOG . warn ( "`edgeCacheDNS` was defined on the request, but no matching Cloudflare DNS Record was found!" ) ; return false ; } if ( ! matchingDnsRecord . get ( ) . isProxied ( ) ) { LOG . warn ( "`edgeCacheDNS` was defined on the request, but {} is not a proxied DNS record!" , edgeCacheDNS ) ; return false ; } String cacheTag = String . format ( edgeCacheConfiguration . getIntegrationSettings ( ) . get ( "cacheTagFormat" ) , request . getLoadBalancerService ( ) . getServiceId ( ) ) ; LOG . debug ( "Sending cache purge request against {} for {} to Cloudflare..." , matchingDnsRecord . get ( ) . getName ( ) , cacheTag ) ; allSucceeded = cf . purgeEdgeCache ( zoneId , Collections . singletonList ( cacheTag ) ) && allSucceeded ; } } return allSucceeded ; } catch ( CloudflareClientException e ) { LOG . error ( "Unable to invalidate Cloudflare cache for request {}" , request , e ) ; return false ; }


signature:
public class BaragonServiceClient { /** * BaragonService overall status */
public Optional < BaragonServiceStatus > getBaragonServiceStatus ( String baseUrl ) { } }

implementation: final String uri = String . format ( STATUS_FORMAT , baseUrl ) ; return getSingle ( uri , "status" , "" , BaragonServiceStatus . class ) ;


signature:
public class BaragonServiceClient { /** * BaragonService service states */
public Collection < BaragonServiceState > getGlobalState ( ) { } }

implementation: final String uri = String . format ( STATE_FORMAT , getBaseUrl ( ) ) ; return getCollection ( uri , "global state" , BARAGON_SERVICE_STATE_COLLECTION ) ;


signature:
public class BaragonServiceClient { /** * BaragonService Workers */
public Collection < String > getBaragonServiceWorkers ( ) { } }

implementation: final String requestUri = String . format ( WORKERS_FORMAT , getBaseUrl ( ) ) ; return getCollection ( requestUri , "baragon service workers" , STRING_COLLECTION ) ;


signature:
public class BaragonServiceClient { /** * BaragonService load balancer group actions */
public Collection < String > getLoadBalancerGroups ( ) { } }

implementation: final String requestUri = String . format ( LOAD_BALANCER_FORMAT , getBaseUrl ( ) ) ; return getCollection ( requestUri , "load balancer groups" , STRING_COLLECTION ) ;


signature:
public class BaragonServiceClient { /** * BaragonService base path actions */
public Collection < String > getOccupiedBasePaths ( String loadBalancerGroupName ) { } }

implementation: final String requestUri = String . format ( LOAD_BALANCER_ALL_BASE_PATHS_FORMAT , getBaseUrl ( ) , loadBalancerGroupName ) ; return getCollection ( requestUri , "occupied base paths" , STRING_COLLECTION ) ;


signature:
public class BaragonServiceClient { /** * BaragonService request actions */
public Optional < BaragonResponse > getRequest ( String requestId ) { } }

implementation: final String uri = String . format ( REQUEST_ID_FORMAT , getBaseUrl ( ) , requestId ) ; return getSingle ( uri , "request" , requestId , BaragonResponse . class ) ;


signature:
public class BaragonServiceClient { /** * BaragonService queued request actions */
public Collection < QueuedRequestId > getQueuedRequests ( ) { } }

implementation: final String uri = String . format ( REQUEST_FORMAT , getBaseUrl ( ) ) ; return getCollection ( uri , "queued requests" , QUEUED_REQUEST_COLLECTION ) ;


signature:
public class BaragonServiceClient { /** * Aliases */
public Optional < BaragonGroupAlias > getAlias ( String name ) { } }

implementation: final String uri = String . format ( ALIASES_FORMAT , getBaseUrl ( ) , name ) ; return getSingle ( uri , "alias" , name , BaragonGroupAlias . class ) ;


signature:
public class ApplicationLoadBalancer { /** * Ensure that the given baragon agent is attached to the given target group . When this function
 * completes , the baragon agent will be attached to the load balancer , whether or not it originally
 * was .
 * @ param baragonAgents BaragonAgent to register with given load balancer
 * @ param loadBalancers Load balancer to register with */
private void guaranteeRegistered ( TrafficSource trafficSource , TargetGroup targetGroup , Collection < TargetDescription > targets , Collection < BaragonAgentMetadata > baragonAgents , Collection < LoadBalancer > loadBalancers ) { } }

implementation:
/* - Check that load balancers , baragon agents , target groups are on same VPC
 - Check that load balancers , targets are on same subnet ( = = AZ )
 - Check that all baragon agents are associated with a target on target group
 - Check that load balancers has listeners , rules to make talk to target group */
if ( configuration . isPresent ( ) && configuration . get ( ) . isCheckForCorrectVpc ( ) ) { guaranteeSameVPC ( targetGroup , baragonAgents , loadBalancers ) ; } guaranteeAzEnabled ( baragonAgents , loadBalancers ) ; guaranteeHasAllTargets ( trafficSource , targetGroup , targets , baragonAgents ) ; // guaranteeListenersPresent ( targetGroup , loadBalancers ) ;


signature:
public class ApplicationLoadBalancer { /** * De - register any targets representing agents that are not known to the BaragonService ,
 * or which otherwise need to be removed .
 * @ param targetGroup TargetGroup to check for old agents
 * @ param agents Known agents , to be used as a reference sheet */
private void deregisterRemovableTargets ( TrafficSource trafficSource , BaragonGroup baragonGroup , TargetGroup targetGroup , Collection < BaragonAgentMetadata > agents , Collection < TargetDescription > targets ) { } }

implementation: Collection < TargetDescription > removableTargets = listRemovableTargets ( trafficSource , baragonGroup , targets , agents ) ; for ( TargetDescription removableTarget : removableTargets ) { try { if ( configuration . isPresent ( ) && ! configuration . get ( ) . isRemoveLastHealthyEnabled ( ) && isLastHealthyInstance ( removableTarget , targetGroup ) ) { LOG . info ( "Will not de-register target {} because it is last healthy instance in {}" , removableTarget , targetGroup ) ; } else { elbClient . deregisterTargets ( new DeregisterTargetsRequest ( ) . withTargetGroupArn ( targetGroup . getTargetGroupArn ( ) ) . withTargets ( removableTarget ) ) ; LOG . info ( "De-registered target {} from target group {}" , removableTarget , targetGroup ) ; } } catch ( AmazonClientException acexn ) { LOG . error ( "Could not de-register target {} from target group {} due to error" , removableTarget , targetGroup , acexn ) ; exceptionNotifier . notify ( acexn , ImmutableMap . of ( "targetGroup" , targetGroup . getTargetGroupName ( ) ) ) ; } }


signature:
public class ApplicationLoadBalancer { /** * When this method completes , the target group , the agents , and the loadBalancers are
 * all on the same VPC .
 * The target group , each of the agents , and each of the load balancers should think
 * that they are on the same VPC , otherwise they won ' t be able to talk to each other .
 * @ param targetGroup Group - and consequently all targets - to check
 * @ param agents Agents to check
 * @ param loadBalancers Load balances to check */
private void guaranteeSameVPC ( TargetGroup targetGroup , Collection < BaragonAgentMetadata > agents , Collection < LoadBalancer > loadBalancers ) { } }

implementation: String vpcId = targetGroup . getVpcId ( ) ; for ( BaragonAgentMetadata agent : agents ) { if ( agent . getEc2 ( ) . getVpcId ( ) . isPresent ( ) ) { if ( ! agent . getEc2 ( ) . getVpcId ( ) . get ( ) . equals ( vpcId ) ) { LOG . error ( "Agent {} not on same VPC as its target group {}" , agent , targetGroup ) ; throw new IllegalStateException ( String . format ( "Agent %s not on same VPC as its target group %s" , agent , targetGroup ) ) ; } } else { LOG . error ( "Agent {} not assigned to a VPC" , agent ) ; throw new IllegalStateException ( String . format ( "Agent %s not assigned to a VPC" , agent ) ) ; } } for ( LoadBalancer loadBalancer : loadBalancers ) { if ( ! vpcId . equals ( loadBalancer . getVpcId ( ) ) ) { LOG . error ( "Load balancer {} on different VPC from target group {}" , loadBalancer , targetGroup ) ; throw new IllegalStateException ( String . format ( "Load balancer %s on different VPC from target group %s" , loadBalancer , targetGroup ) ) ; } }


signature:
public class ApplicationLoadBalancer { /** * After this method completes , every agent in baragonAgents should be associated with
 * a target in the given target group .
 * @ param targetGroup group to register in
 * @ param baragonAgents agents to be registered */
private void guaranteeHasAllTargets ( TrafficSource trafficSource , TargetGroup targetGroup , Collection < TargetDescription > targets , Collection < BaragonAgentMetadata > baragonAgents ) { } }

implementation: Collection < TargetDescription > targetDescriptions = new HashSet < > ( ) ; for ( BaragonAgentMetadata agent : baragonAgents ) { try { if ( ( trafficSource . getRegisterBy ( ) == RegisterBy . INSTANCE_ID && agent . getEc2 ( ) . getInstanceId ( ) . isPresent ( ) ) || ( trafficSource . getRegisterBy ( ) == RegisterBy . PRIVATE_IP && agent . getEc2 ( ) . getPrivateIp ( ) . isPresent ( ) ) ) { String id = trafficSource . getRegisterBy ( ) == RegisterBy . INSTANCE_ID ? agent . getEc2 ( ) . getInstanceId ( ) . get ( ) : agent . getEc2 ( ) . getPrivateIp ( ) . get ( ) ; if ( agentShouldRegisterInTargetGroup ( id , targets ) ) { targetDescriptions . add ( new TargetDescription ( ) . withId ( id ) ) ; LOG . info ( "Will register agent {} to target in group {}" , agent , targetGroup ) ; } else { LOG . debug ( "Agent {} is already registered" , agent ) ; } } } catch ( Exception exn ) { LOG . error ( "Could not create request to register agent {} due to error" , agent , exn ) ; exceptionNotifier . notify ( exn , ImmutableMap . of ( "agent" , agent . toString ( ) ) ) ; } } if ( targetDescriptions . isEmpty ( ) ) { LOG . debug ( "No new instances to register with target group" ) ; } else { try { RegisterTargetsRequest registerTargetsRequest = new RegisterTargetsRequest ( ) . withTargetGroupArn ( targetGroup . getTargetGroupArn ( ) ) . withTargets ( targetDescriptions ) ; elbClient . registerTargets ( registerTargetsRequest ) ; LOG . info ( "Registered targets {} onto target group {}" , targetDescriptions , targetGroup ) ; } catch ( AmazonClientException acexn ) { LOG . error ( "Failed to register targets {} onto target group {}" , targetDescriptions , targetGroup ) ; exceptionNotifier . notify ( acexn , ImmutableMap . of ( "targets" , targetDescriptions . toString ( ) , "targetGroup" , targetGroup . toString ( ) ) ) ; } }


signature:
public class BaragonRequestDatastore { /** * REQUEST MESSAGE */
@ Timed public Optional < String > getRequestMessage ( String requestId ) { } }

implementation: return readFromZk ( String . format ( REQUEST_MESSAGE_FORMAT , requestId ) , String . class ) ;


signature:
public class SchemaLink { /** * backwards compatibility , would be canged in next version */
public void setHref ( String href ) { } }

implementation: if ( href . contains ( "%7B" ) ) { try { href = URLDecoder . decode ( href , "UTF-8" ) ; } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( e ) ; } } this . href = new UriTemplate ( href ) ;


signature:
public class TrimouProperties { /** * Apply the { @ link TrimouProperties } to a { @ link MustacheEngineBuilder } .
 * @ param engineBuilder the Trimou mustache engine builder to apply the properties to */
public void applyToTrimouMustacheEngineBuilder ( final MustacheEngineBuilder engineBuilder ) { } }

implementation: engineBuilder . setProperty ( EngineConfigurationKey . START_DELIMITER , getStartDelimiter ( ) ) . setProperty ( EngineConfigurationKey . END_DELIMITER , getEndDelimiter ( ) ) . setProperty ( EngineConfigurationKey . PRECOMPILE_ALL_TEMPLATES , isPrecompileTemplates ( ) ) . setProperty ( EngineConfigurationKey . REMOVE_STANDALONE_LINES , isRemoveStandaloneLines ( ) ) . setProperty ( EngineConfigurationKey . REMOVE_UNNECESSARY_SEGMENTS , isRemoveUnnecessarySegments ( ) ) . setProperty ( EngineConfigurationKey . DEBUG_MODE , isDebugMode ( ) ) . setProperty ( EngineConfigurationKey . CACHE_SECTION_LITERAL_BLOCK , isCacheSectionLiteralBlock ( ) ) . setProperty ( EngineConfigurationKey . TEMPLATE_RECURSIVE_INVOCATION_LIMIT , getTemplateRecursiveInvocationLimit ( ) ) . setProperty ( EngineConfigurationKey . SKIP_VALUE_ESCAPING , isSkipValueEscaping ( ) ) . setProperty ( EngineConfigurationKey . DEFAULT_FILE_ENCODING , getCharset ( ) . name ( ) ) . setProperty ( EngineConfigurationKey . TEMPLATE_CACHE_ENABLED , isCache ( ) ) . setProperty ( EngineConfigurationKey . TEMPLATE_CACHE_EXPIRATION_TIMEOUT , getTemplateCacheExpirationTimeout ( ) ) . setProperty ( EngineConfigurationKey . HANDLEBARS_SUPPORT_ENABLED , isEnableHelper ( ) ) . setProperty ( EngineConfigurationKey . REUSE_LINE_SEPARATOR_SEGMENTS , isReuseLineSeparatorSegments ( ) ) . setProperty ( EngineConfigurationKey . ITERATION_METADATA_ALIAS , getIterationMetadataAlias ( ) ) . setProperty ( EngineConfigurationKey . RESOLVER_HINTS_ENABLED , isEnableResolverHints ( ) ) . setProperty ( EngineConfigurationKey . NESTED_TEMPLATE_SUPPORT_ENABLED , isEnableNestedTemplates ( ) ) . setProperty ( EngineConfigurationKey . TEMPLATE_CACHE_USED_FOR_SOURCE , isCacheTemplateSources ( ) ) ;


signature:
public class MemberKey { /** * Simple factory method to obtain a new instance for the given context
 * object and name .
 * @ param contextObject
 * @ param name
 * @ return a new instance */
static MemberKey newInstance ( Object contextObject , String name ) { } }

implementation:
if ( contextObject instanceof Class < ? > ) { Class < ? > clazz = ( Class < ? > ) contextObject ; if ( clazz . isEnum ( ) && ( "values" . equals ( name ) || Reflections . isConstantName ( clazz , name ) ) ) { // Special handling for enums - allows to access values ( ) and constants
return new MemberKey ( clazz , name ) ; } } return new MemberKey ( contextObject . getClass ( ) , name ) ;


signature:
public class TrimouViewResolver { /** * Returns true , if the cache of the { @ link MustacheEngine } is enabled and the debug mode is disabled . Also Spring ' s
 * view resolution caching must be enabled . */
@ Override public boolean isCache ( ) { } }

implementation: return engine . getConfiguration ( ) . getBooleanPropertyValue ( EngineConfigurationKey . TEMPLATE_CACHE_ENABLED ) && ! engine . getConfiguration ( ) . getBooleanPropertyValue ( EngineConfigurationKey . DEBUG_MODE ) && super . isCache ( ) ;


signature:
public class DefaultParser { /** * Line separator end - flush .
 * @ param lineSeparator */
private void lineSeparatorFound ( String lineSeparator ) { } }

implementation: flushText ( ) ; flushLineSeparator ( lineSeparator ) ; line ++ ; state = State . TEXT ; separatorIdx = 0 ;


signature:
public class DefaultParser { /** * Real tag end - flush . */
private void flushTag ( ) { } }

implementation: state = State . TEXT ; handler . tag ( deriveTag ( buffer . toString ( ) ) ) ; delimiterIdx = 0 ; clearBuffer ( ) ;


signature:
public class DefaultParser { /** * Identify the tag type ( variable , comment , etc . ) .
 * @ param buffer
 * @ param delimiters
 * @ return the tag type */
private MustacheTagType identifyTagType ( String buffer ) { } }

implementation:
if ( buffer . length ( ) == 0 ) { return MustacheTagType . VARIABLE ; } // Triple mustache is supported for default delimiters only
if ( delimiters . hasDefaultDelimitersSet ( ) && buffer . charAt ( 0 ) == ( ( String ) EngineConfigurationKey . START_DELIMITER . getDefaultValue ( ) ) . charAt ( 0 ) && buffer . charAt ( buffer . length ( ) - 1 ) == ( ( String ) EngineConfigurationKey . END_DELIMITER . getDefaultValue ( ) ) . charAt ( 0 ) ) { return MustacheTagType . UNESCAPE_VARIABLE ; } Character command = buffer . charAt ( 0 ) ; for ( MustacheTagType type : MustacheTagType . values ( ) ) { if ( command . equals ( type . getCommand ( ) ) ) { return type ; } } return MustacheTagType . VARIABLE ;


signature:
public class DefaultParser { /** * Extract the tag content .
 * @ param buffer
 * @ return */
private String extractContent ( MustacheTagType tagType , String buffer ) { } }

implementation: switch ( tagType ) { case VARIABLE : return buffer . trim ( ) ; case UNESCAPE_VARIABLE : return ( buffer . charAt ( 0 ) == ( ( String ) EngineConfigurationKey . START_DELIMITER . getDefaultValue ( ) ) . charAt ( 0 ) ? buffer . substring ( 1 , buffer . length ( ) - 1 ) . trim ( ) : buffer . substring ( 1 ) . trim ( ) ) ; case SECTION : case INVERTED_SECTION : case PARTIAL : case EXTEND : case EXTEND_SECTION : case SECTION_END : case NESTED_TEMPLATE : case COMMENT : return buffer . substring ( 1 ) . trim ( ) ; case DELIMITER : return buffer . trim ( ) ; default : return null ; }


signature:
public class AbstractReleaseCallbackContainer { /** * Release all the resources , i . e . invoke { @ link ReleaseCallback # release ( ) }
 * on each callback . All the callbacks are always invoked , even if one of
 * the invocation fails ( throws unchecked exception ) . Callbacks are invoked
 * in the order in which they were registered . */
public void release ( ) { } }

implementation: if ( releaseCallbacks == null ) { return ; } for ( ReleaseCallback callback : releaseCallbacks ) { try { callback . release ( ) ; } catch ( Exception e ) { LOGGER . warn ( "Exception occured during release callback invocation:" , e ) ; } }


signature:
public class NumericExpressionHelper { /** * Invokes the specified consumer for all operators . { @ link Operator # toString ( ) }
 * is used as the first argument and the corresponding
 * { @ link NumericExpressionHelper } instance as the second argument .
 * @ param consumer */
public static void forEachOperator ( BiConsumer < String , Helper > consumer ) { } }

implementation: for ( Operator operator : Operator . values ( ) ) { consumer . accept ( operator . toString ( ) . toLowerCase ( ) , new NumericExpressionHelper ( operator ) ) ; }


signature:
public class SegmentBases { /** * Read segment lines recursively .
 * @ param container
 * @ return */
private static List < List < SegmentBase > > readSegmentLines ( ContainerSegmentBase container ) { } }

implementation:
List < List < SegmentBase > > lines = new ArrayList < > ( ) ; // Add the last line manually - there is no line separator to trigger
// flush
lines . add ( readSegmentLines ( lines , null , container ) ) ; return lines ;


signature:
public class Patterns { /** * Delimiters are quoted to avoid regexp reserved characters conflict .
 * @ param configuration
 * @ return the new delimiters pattern */
public static Pattern newMustacheTagPattern ( Configuration configuration ) { } }

implementation: StringBuilder regex = new StringBuilder ( ) ; regex . append ( Pattern . quote ( configuration . getStringPropertyValue ( EngineConfigurationKey . START_DELIMITER ) ) ) ; regex . append ( ".*?" ) ; regex . append ( Pattern . quote ( configuration . getStringPropertyValue ( EngineConfigurationKey . END_DELIMITER ) ) ) ; return Pattern . compile ( regex . toString ( ) ) ;


signature:
public class Decorator { /** * Returns a decorator instance for the specified delegate and mappings .
 * @ param delegate
 * @ param mappings
 * @ param delegateKey
 * May be null
 * @ param configuration
 * @ return a new decorator instance */
public static < T > Decorator < T > decorate ( T delegate , Map < String , Function < T , Object > > mappings , String delegateKey , Configuration configuration ) { } }

implementation: return IterableDecorator . isIterable ( delegate ) ? new IterableDecorator < > ( delegate , ImmutableMap . copyOf ( mappings ) , delegateKey , configuration ) : new Decorator < > ( delegate , ImmutableMap . copyOf ( mappings ) , delegateKey , configuration ) ;


signature:
public class Decorator { /** * This method is recursive .
 * @ return the underlying delegate instance */
@ SuppressWarnings ( "unchecked" ) public static < T > T unwrap ( T instance ) { } }

implementation: return instance instanceof Decorator ? unwrap ( ( ( Decorator < T > ) instance ) . delegate ) : instance ;


signature:
public class MustacheEngineBuilder { /** * Builds the engine instance .
 * @ return the built engine */
public synchronized MustacheEngine build ( ) { } }

implementation: MustacheEngine engine = new DefaultMustacheEngine ( this ) ; for ( EngineBuiltCallback callback : engineReadyCallbacks ) { callback . engineBuilt ( engine ) ; } BuildInfo buildInfo = BuildInfo . load ( ) ; LOGGER . info ( "Engine built {} ({})" , buildInfo . getVersion ( ) , buildInfo . getTimestampDate ( ) ) ; LOGGER . debug ( "Engine configuration: {}" , engine . getConfiguration ( ) . getInfo ( ) ) ; isBuilt = true ; return engine ;


signature:
public class MustacheEngineBuilder { /** * Adds a value ( e . g . Lambda ) that is available during execution of all
 * templates .
 * Global values have to be thread - safe .
 * @ param value
 * @ param name
 * @ return self */
public MustacheEngineBuilder addGlobalData ( String name , Object value ) { } }

implementation: checkArgumentsNotNull ( name , value ) ; checkNotBuilt ( ) ; this . globalData . put ( name , value ) ; return this ;


signature:
public class MustacheEngineBuilder { /** * Adds a template locator .
 * @ param locator
 * @ return self */
public MustacheEngineBuilder addTemplateLocator ( TemplateLocator locator ) { } }

implementation: checkArgumentNotNull ( locator ) ; checkNotBuilt ( ) ; this . templateLocators . add ( locator ) ; return this ;


signature:
public class MustacheEngineBuilder { /** * Adds a value resolver .
 * @ param resolver
 * @ return self */
public MustacheEngineBuilder addResolver ( Resolver resolver ) { } }

implementation: checkArgumentNotNull ( resolver ) ; checkNotBuilt ( ) ; this . resolvers . add ( resolver ) ; return this ;


signature:
public class MustacheEngineBuilder { /** * Sets a configuration property .
 * @ param key
 * @ param value
 * @ return self */
public MustacheEngineBuilder setProperty ( String key , Object value ) { } }

implementation: checkArgumentsNotNull ( key , value ) ; checkNotBuilt ( ) ; this . properties . put ( key , value ) ; return this ;