public String getBufferClassName() { return configuration.getBufferClassName(); }
public String getBufferClassName() { return configuration.getBufferClassName(); }
public String getBufferClassName() { return configuration.getBufferClassName(); }
public String getBufferClassName() { return configuration.getBufferClassName(); }
/** * return a new instance of LogBuffer. * <p>Actual LogBuffer implementation class is specified by * configuration. * * @return a new instance of LogBuffer */ LogBuffer getLogBuffer(int index) throws ClassNotFoundException { LogBuffer lb = null; Class lbcls = this.getClass().getClassLoader().loadClass(config.getBufferClassName()); try { Constructor lbCtor = lbcls.getDeclaredConstructor(new Class[] { Configuration.class } ); lb = (LogBuffer)lbCtor.newInstance(new Object[] {config}); lb.index = index; } catch (InstantiationException e) { throw new ClassNotFoundException(e.toString()); } catch (IllegalAccessException e) { throw new ClassNotFoundException(e.toString()); } catch (NoSuchMethodException e) { throw new ClassNotFoundException(e.toString()); } catch (IllegalArgumentException e) { throw new ClassNotFoundException(e.toString()); } catch (InvocationTargetException e) { throw new ClassNotFoundException(e.toString()); } return lb; }
/** * return a new instance of LogBuffer. * <p>Actual LogBuffer implementation class is specified by * configuration. * * @return a new instance of LogBuffer */ LogBuffer getLogBuffer(int index) throws ClassNotFoundException { LogBuffer lb = null; Class lbcls = this.getClass().getClassLoader().loadClass(config.getBufferClassName()); try { Constructor lbCtor = lbcls.getDeclaredConstructor(new Class[] { Configuration.class } ); lb = (LogBuffer)lbCtor.newInstance(new Object[] {config}); lb.index = index; } catch (InstantiationException e) { throw new ClassNotFoundException(e.toString()); } catch (IllegalAccessException e) { throw new ClassNotFoundException(e.toString()); } catch (NoSuchMethodException e) { throw new ClassNotFoundException(e.toString()); } catch (IllegalArgumentException e) { throw new ClassNotFoundException(e.toString()); } catch (InvocationTargetException e) { throw new ClassNotFoundException(e.toString()); } return lb; }
/** * return a new instance of LogBuffer. * <p>Actual LogBuffer implementation class is specified by * configuration. * * @return a new instance of LogBuffer */ LogBuffer getLogBuffer(int index) throws ClassNotFoundException { LogBuffer lb = null; Class lbcls = this.getClass().getClassLoader().loadClass(config.getBufferClassName()); try { Constructor lbCtor = lbcls.getDeclaredConstructor(new Class[] { Configuration.class } ); lb = (LogBuffer)lbCtor.newInstance(new Object[] {config}); lb.index = index; } catch (InstantiationException e) { throw new ClassNotFoundException(e.toString()); } catch (IllegalAccessException e) { throw new ClassNotFoundException(e.toString()); } catch (NoSuchMethodException e) { throw new ClassNotFoundException(e.toString()); } catch (IllegalArgumentException e) { throw new ClassNotFoundException(e.toString()); } catch (InvocationTargetException e) { throw new ClassNotFoundException(e.toString()); } return lb; }
/** * open Log files and perform necessart initialization. * * TODO: consider open(String name) to allow named configurations. * this would allow utility to open two loggers and copy * old records to new files. * */ public void open() throws InvalidFileSetException, IOException, LogConfigurationException, InvalidLogBufferException, InterruptedException { lfmgr.open(); try { bmgr.open(); } catch (ClassNotFoundException e) { String cnf = "LogBuffer Class not found: " + config.getBufferClassName(); LogConfigurationException lce = new LogConfigurationException(cnf, e); throw lce; } // read header information from each file lfmgr.init(bmgr); // indicate that Log is ready for use. synchronized(this) { isClosed = false; } }
/** * open Log files and perform necessart initialization. * * TODO: consider open(String name) to allow named configurations. * this would allow utility to open two loggers and copy * old records to new files. * */ public void open() throws InvalidFileSetException, IOException, LogConfigurationException, InvalidLogBufferException, InterruptedException { lfmgr.open(); try { bmgr.open(); } catch (ClassNotFoundException e) { String cnf = "LogBuffer Class not found: " + config.getBufferClassName(); LogConfigurationException lce = new LogConfigurationException(cnf, e); throw lce; } // read header information from each file lfmgr.init(bmgr); // indicate that Log is ready for use. synchronized(this) { isClosed = false; } }
/** * open Log files and perform necessart initialization. * * TODO: consider open(String name) to allow named configurations. * this would allow utility to open two loggers and copy * old records to new files. * */ public void open() throws InvalidFileSetException, IOException, LogConfigurationException, InvalidLogBufferException, InterruptedException { lfmgr.open(); try { bmgr.open(); } catch (ClassNotFoundException e) { String cnf = "LogBuffer Class not found: " + config.getBufferClassName(); LogConfigurationException lce = new LogConfigurationException(cnf, e); throw lce; } // read header information from each file lfmgr.init(bmgr); // indicate that Log is ready for use. synchronized(this) { isClosed = false; } }
/** * open Log files and perform necessart initialization. * * TODO: consider open(String name) to allow named configurations. * this would allow utility to open two loggers and copy * old records to new files. * */ public void open() throws InvalidFileSetException, IOException, LogConfigurationException, InvalidLogBufferException, InterruptedException { lfmgr.open(); try { bmgr.open(); } catch (ClassNotFoundException e) { String cnf = "LogBuffer Class not found: " + config.getBufferClassName(); LogConfigurationException lce = new LogConfigurationException(cnf, e); throw lce; } // read header information from each file lfmgr.init(bmgr); // indicate that Log is ready for use. synchronized(this) { isClosed = false; } }