public synchronized Name getServiceName ( ) { if ( size ( ) < 2 ) { return null ; } if ( cachedServiceName == null ) { cachedServiceName = getCompositeKey ( ) . getPrefix ( size ( ) - 1 ) ; } return cachedServiceName ; }
If the composite key is either empty or has a single node there is no service name .