protected void generateNewBasename() {
        Properties localProps = new Properties(); 
        localProps.setProperty("prefix", settings.getPrefix());
        synchronized(this.getClass()) {
            // ensure that serialNo and timestamp are minted together (never inverted sort order)
            String paddedSerialNumber = WriterPoolMember.serialNoFormatter.format(serialNo.getAndIncrement());
            String timestamp17 = ArchiveUtils.getUnique17DigitDate(); 
            String timestamp14 = ArchiveUtils.getUnique14DigitDate(); 
            currentTimestamp = timestamp17;
            localProps.setProperty("serialno", paddedSerialNumber);
            localProps.setProperty("timestamp17", timestamp17);
            localProps.setProperty("timestamp14", timestamp14);
        }
        currentBasename = PropertyUtils.interpolateWithProperties(settings.getTemplate(), 
                localProps, System.getProperties());
    }
protected void generateNewBasename ( ) { Properties localProps = new Properties ( ) ; localProps . setProperty ( "prefix" , settings . getPrefix ( ) ) ; synchronized ( this . getClass ( ) ) { String paddedSerialNumber = WriterPoolMember . serialNoFormatter . format ( serialNo . getAndIncrement ( ) ) ; String timestamp17 = ArchiveUtils . getUnique17DigitDate ( ) ; String timestamp14 = ArchiveUtils . getUnique14DigitDate ( ) ; currentTimestamp = timestamp17 ; localProps . setProperty ( "serialno" , paddedSerialNumber ) ; localProps . setProperty ( "timestamp17" , timestamp17 ) ; localProps . setProperty ( "timestamp14" , timestamp14 ) ; } currentBasename = PropertyUtils . interpolateWithProperties ( settings . getTemplate ( ) , localProps , System . getProperties ( ) ) ; }
Generate a new basename by interpolating values in the configured
template. Values come from local state, other configured values, and
global system properties. The recommended default template will
generate a unique basename under reasonable assumptions.