public synchronized void setRepositoryInfo ( LogRepositoryManager manager , File repositoryLocation , long repositorySpaceNeeded ) throws IllegalArgumentException { if ( manager == null ) throw new IllegalArgumentException ( "Null manager passed to LogRepositorySpaceAlert.setRepositoryInfo" ) ; if ( repositoryLocation == null ) throw new IllegalArgumentException ( "Null repositoryLocation passed to LogRepositorySpaceAlert.setRepositoryInfo" ) ; /* Don't do logging here since it would cause infinite loop with *=all trace spec. if (logger.isLoggable(Level.FINER)) logger.logp(Level.FINER, className, "setRepositoryInfo", "Args: manager: "+manager+" loc: "+ repositoryLocation.getPath()+" rSpc: "+repositorySpaceNeeded) ; */ RepositoryInfo curRI = repositoryInfo . get ( manager ) ; if ( curRI == null ) { File fsRoot = calculateFsRoot ( repositoryLocation ) ; FileSystemInfo fs = fsInfo . get ( fsRoot ) ; if ( fs == null ) { fs = new FileSystemInfo ( ) ; fsInfo . put ( fsRoot , fs ) ; } curRI = new RepositoryInfo ( fs ) ; repositoryInfo . put ( manager , curRI ) ; } curRI . setRespositorySpaceNeeded ( repositorySpaceNeeded ) ; }
Set a repository into the space alert for checking . In HPEL the LogManager for log and the LogManager for Trace should set themselves as repositories to watch . This is done on the opening of each file . Thus if a destination is moved a file is rolled or a server is started the info will be updated