rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
throws NotImplementedException | public void setDesignTime (boolean dtime) throws NotImplementedException { throw new Error ("Not implemented"); } | |
throw new Error ("Not implemented"); | boolean save = designTime; designTime = dtime; firePropertyChange(DesignMode.PROPERTYNAME, Boolean.valueOf(save), Boolean.valueOf(dtime)); | public void setDesignTime (boolean dtime) throws NotImplementedException { throw new Error ("Not implemented"); } |
throws PropertyVetoException, NotImplementedException | throws PropertyVetoException | public void setLocale (Locale newLocale) throws PropertyVetoException, NotImplementedException { throw new Error ("Not implemented"); } |
throw new Error ("Not implemented"); | if (newLocale == null || locale == newLocale) return; fireVetoableChange("locale", locale, newLocale); Locale oldLocale = locale; locale = newLocale; firePropertyChange("locale", oldLocale, newLocale); | public void setLocale (Locale newLocale) throws PropertyVetoException, NotImplementedException { throw new Error ("Not implemented"); } |
throws NotImplementedException | public int size () throws NotImplementedException { throw new Error ("Not implemented"); } | |
throw new Error ("Not implemented"); | synchronized (children) { return children.size(); } | public int size () throws NotImplementedException { throw new Error ("Not implemented"); } |
} | public Object[] toArray () { return children.keySet().toArray(); } | |
throws NotImplementedException | protected boolean validatePendingAdd (Object targetChild) throws NotImplementedException { throw new Error ("Not implemented"); } | |
throw new Error ("Not implemented"); | return true; | protected boolean validatePendingAdd (Object targetChild) throws NotImplementedException { throw new Error ("Not implemented"); } |
throws NotImplementedException | protected boolean validatePendingRemove (Object targetChild) throws NotImplementedException { throw new Error ("Not implemented"); } | |
throw new Error ("Not implemented"); | return true; | protected boolean validatePendingRemove (Object targetChild) throws NotImplementedException { throw new Error ("Not implemented"); } |
public BeanContextMembershipEvent(BeanContext context, Object[] children) { | public BeanContextMembershipEvent(BeanContext context, Collection children) { | public BeanContextMembershipEvent(BeanContext context, Object[] children) { super(context); this.children = Arrays.asList(children); } |
this.children = Arrays.asList(children); | this.children = children; | public BeanContextMembershipEvent(BeanContext context, Object[] children) { super(context); this.children = Arrays.asList(children); } |
if (box.getStyle().isFixed()) { currentLine.setFixedDescendant(true); } | public static void generateAbsoluteBox(LayoutContext c, Content content, LineBox currentLine) { Rectangle oe = c.getExtents();// copy the extents for safety c.setExtents(new Rectangle(oe)); Box box = Boxing.layout(c, content); box.setContainingBlock(c.getLayer().getMaster()); box.... | |
tableBox.setState(Box.DONE); outerBox.setState(Box.DONE); | public static Box layout(Context c, Box outerBox, Content content) { boolean set_bfc = false; if (content instanceof TableContent) { // install a block formatting context for the body, // ie. if it's null. // set up the outtermost bfc if (c.getBlockFormattin... | |
boolean set_bfc = false; if (c.getBlockFormattingContext() == null) { block.setParent(c.getCtx().getRootBox()); BlockFormattingContext bfc = new BlockFormattingContext(block, c); c.pushBFC(bfc); set_bfc = true; bfc.setWidth((int) c.getExtents().getWidth()); } | BlockFormattingContext bfc = new BlockFormattingContext(block, c); c.pushBFC(bfc); bfc.setWidth((int) c.getExtents().getWidth()); | public static CellBox layoutCell(Context c, CellBox block, Content content, boolean fixed, TableBox table, int col) { //OK, first set up the current style. All depends on this... CascadedStyle pushed = content.getStyle(); if (pushed != null) { c.pushStyle(pushed); } if ... |
if (set_bfc) { c.getBlockFormattingContext().doFinalAdjustments(); c.popBFC(); } | c.getBlockFormattingContext().doFinalAdjustments(); c.popBFC(); | public static CellBox layoutCell(Context c, CellBox block, Content content, boolean fixed, TableBox table, int col) { //OK, first set up the current style. All depends on this... CascadedStyle pushed = content.getStyle(); if (pushed != null) { c.pushStyle(pushed); } if ... |
block.setState(Box.DONE); | public static CellBox layoutCell(Context c, CellBox block, Content content, boolean fixed, TableBox table, int col) { //OK, first set up the current style. All depends on this... CascadedStyle pushed = content.getStyle(); if (pushed != null) { c.pushStyle(pushed); } if ... | |
row.setState(Box.DONE); | private static RowBox layoutRow(Context c, TableRowContent tableRowContent, TableBox table, boolean fixed, int borderSpacingHorizontal, int borderSpacingVertical) { // copy the extents Rectangle oe = c.getExtents(); c.setExtents(new Rectangle(oe)); RowBox row = new RowBox(); Casca... | |
String selector, boolean noLocal, String consumerID, boolean isCC) | String selector, boolean noLocal, int consumerID, boolean isCC) | public ConsumerState(SessionState parent, ConsumerDelegate delegate, Destination dest, String selector, boolean noLocal, String consumerID, boolean isCC) { super(parent, delegate); children = Collections.EMPTY_SET; this.destination = dest; this.selector = selector; t... |
public String getConsumerID() | public int getConsumerID() | public String getConsumerID() { return consumerID; } |
ms = new PagingMessageStore("in-memory-store0"); | ms = new SimpleMessageStore("in-memory-store0"); | public void setUp() throws Exception { super.setUp(); ms = new PagingMessageStore("in-memory-store0"); ref = ms.reference(MessageFactory.createCoreMessage(0)); observer = new SimpleDeliveryObserver(); } |
add(new BootClassInfo("org.jnode.system", true, nonCore)); | protected void setupBootClasses() { final int core = BootClassInfo.F_ALL; //final int core = BootClassInfo.F_RESOLVEALL; final int nonCore = BootClassInfo.F_RESOLVEALL; //final int nonCore = BootClassInfo.F_ALL; add(new BootClassInfo("java.lang.Class", true, core)); add(new BootClassInfo("java.lang.Object", true... | |
if (block.fixed) { | if (block.getStyle().isFixed()) { | public static void paint(Context c, Box box, boolean stylePushed, boolean restyle) { Box block = (Box) box; restyle = restyle || box.restyle;//cascade it down box.restyle = false;//reset if (block instanceof AnonymousBlockBox) { InlineRendering.paintInlineContext(c, block, res... |
} else if (block.absolute) { | } else if (block.getStyle().isAbsolute()) { | public static void paint(Context c, Box box, boolean stylePushed, boolean restyle) { Box block = (Box) box; restyle = restyle || box.restyle;//cascade it down box.restyle = false;//reset if (block instanceof AnonymousBlockBox) { InlineRendering.paintInlineContext(c, block, res... |
IdentValue decoration = c.getCurrentStyle().getIdent(CSSName.TEXT_DECORATION); | IdentValue decoration = calculatedStyle.getIdent(CSSName.TEXT_DECORATION); | public static void paint(Context c, Box box, boolean stylePushed, boolean restyle) { Box block = (Box) box; restyle = restyle || box.restyle;//cascade it down box.restyle = false;//reset if (block instanceof AnonymousBlockBox) { InlineRendering.paintInlineContext(c, block, res... |
c.getDecorations().addLast(new TextDecoration(decoration, 0, c.getCurrentStyle().getColor(), FontUtil.getLineMetrics(c, null))); | c.getDecorations().addLast(new TextDecoration(decoration, 0, calculatedStyle.getColor(), FontUtil.getLineMetrics(c, null))); | public static void paint(Context c, Box box, boolean stylePushed, boolean restyle) { Box block = (Box) box; restyle = restyle || box.restyle;//cascade it down box.restyle = false;//reset if (block instanceof AnonymousBlockBox) { InlineRendering.paintInlineContext(c, block, res... |
if (box.relative) { | if (box.getStyle().isRelative()) { | public static void paint(Context c, Box box, boolean stylePushed, boolean restyle) { Box block = (Box) box; restyle = restyle || box.restyle;//cascade it down box.restyle = false;//reset if (block instanceof AnonymousBlockBox) { InlineRendering.paintInlineContext(c, block, res... |
if (ContentUtil.isListItem(c.getCurrentStyle())) { | if (ContentUtil.isListItem(calculatedStyle)) { | public static void paint(Context c, Box box, boolean stylePushed, boolean restyle) { Box block = (Box) box; restyle = restyle || box.restyle;//cascade it down box.restyle = false;//reset if (block instanceof AnonymousBlockBox) { InlineRendering.paintInlineContext(c, block, res... |
if (!box.absolute) { | if (!box.getStyle().isAbsolute()) { | public static void paint(Context c, Box box, boolean stylePushed, boolean restyle) { Box block = (Box) box; restyle = restyle || box.restyle;//cascade it down box.restyle = false;//reset if (block instanceof AnonymousBlockBox) { InlineRendering.paintInlineContext(c, block, res... |
} if (style != null) { c.popStyle(); | public static void paint(Context c, Box box, boolean stylePushed, boolean restyle) { Box block = (Box) box; restyle = restyle || box.restyle;//cascade it down box.restyle = false;//reset if (block instanceof AnonymousBlockBox) { InlineRendering.paintInlineContext(c, block, res... | |
CalculatedStyle style = c.getCurrentStyle(); | CalculatedStyle style = block.getStyle().getCalculatedStyle(); | public static void paintAbsoluteBox(Context c, Box block, boolean restyle) { Rectangle rect = c.getExtents(); //why this? int xoff = 0; int yoff = 0; //Uu.p("xoff = " + xoff + " yoff = " + yoff); BlockFormattingContext bfc = c.getBlockFormattingContext(); //Uu.p("b... |
CalculatedStyle style = c.getCurrentStyle(); | CalculatedStyle style = box.getStyle().getCalculatedStyle(); | public static void paintBackground(Context c, Box box, Rectangle bounds) { Box block = box; // cache the background color //no sense getBackgroundColor(c); // get the css properties CalculatedStyle style = c.getCurrentStyle(); String back_image = style.getStringProperty(CSS... |
block.repeat = style.getIdent(CSSName.BACKGROUND_REPEAT); block.attachment = style.getIdent(CSSName.BACKGROUND_ATTACHMENT); | public static void paintBackground(Context c, Box box, Rectangle bounds) { Box block = box; // cache the background color //no sense getBackgroundColor(c); // get the css properties CalculatedStyle style = c.getCurrentStyle(); String back_image = style.getStringProperty(CSS... | |
Border margin = block.getMarginWidth(); | Border margin = block.getStyle().getMarginWidth(); | public static void paintNormal(Context c, Box block, boolean restyle) { int width = block.getWidth(); int height = block.getHeight(); if (block.getState() != Box.DONE) { height += c.getCanvas().getHeight(); } Border margin = block.getMarginWidth(); Rectangle boun... |
BorderPainter.paint(bounds, BorderPainter.ALL, c.getCurrentStyle(), c.getGraphics(), c.getCtx(), 0); | BorderPainter.paint(bounds, BorderPainter.ALL, block.getStyle().getCalculatedStyle(), c.getGraphics(), c.getCtx(), 0); | public static void paintNormal(Context c, Box block, boolean restyle) { int width = block.getWidth(); int height = block.getHeight(); if (block.getState() != Box.DONE) { height += c.getCanvas().getHeight(); } Border margin = block.getMarginWidth(); Rectangle boun... |
Relative.translateRelative(ctx, true); | Relative.translateRelative(ctx, block.getStyle().getCalculatedStyle(), true); | public static void paintRelative(Context ctx, Box block, boolean restyle) { Relative.translateRelative(ctx, true); paintNormal(ctx, block, restyle); Relative.untranslateRelative(ctx, true); } |
Relative.untranslateRelative(ctx, true); | Relative.untranslateRelative(ctx, block.getStyle().getCalculatedStyle(), true); | public static void paintRelative(Context ctx, Box block, boolean restyle) { Relative.translateRelative(ctx, true); paintNormal(ctx, block, restyle); Relative.untranslateRelative(ctx, true); } |
return new PlainDocument(); | PlainDocument doc = new PlainDocument(); doc.putProperty("filterNewlines", Boolean.TRUE); return doc; | protected Document createDefaultModel() { return new PlainDocument(); } |
public void putProperty(Object key, Object value) | public final void putProperty(Object key, Object value) | public void putProperty(Object key, Object value) { // FIXME: make me thread-safe if (properties == null) properties = new Hashtable(); properties.put(key, value); } |
c.setCurrentPage(i); | c.setPage(i, currentPage); | public void createPDF(OutputStream os) throws DocumentException { List pages = _root.getLayer().getPages(); RenderingContext c = newRenderingContext(); PageBox firstPage = (PageBox)pages.get(0); com.lowagie.text.Rectangle firstPageSize = new com.lowagie.text.Rectangle( ... |
void setEscapeProcessing(boolean enable) throws SQLException; | void setEscapeProcessing(boolean escape) throws SQLException; | void setEscapeProcessing(boolean enable) throws SQLException; |
void setFetchSize(int rows) throws SQLException; | void setFetchSize(int numRows) throws SQLException; | void setFetchSize(int rows) throws SQLException; |
void setMaxFieldSize(int max) throws SQLException; | void setMaxFieldSize(int maxSize) throws SQLException; | void setMaxFieldSize(int max) throws SQLException; |
void setMaxRows(int max) throws SQLException; | void setMaxRows(int maxRows) throws SQLException; | void setMaxRows(int max) throws SQLException; |
sb.append("table { background-color: #ddffdd; }"); | sb.append("ul { background-color: #ddffdd; }"); sb.append("li { list-style-type: none; }"); sb.append("a { text-decoration: none; }"); | public static String list(File file) { StringBuffer sb = new StringBuffer(); sb.append("<html>"); sb.append("<head>"); sb.append("<title>Directory listing of "); sb.append(file.getPath()); sb.append("</title>"); sb.append("<style>"); sb.append("table { backgro... |
sb.append("<p>the file "); | sb.append("<p>the contents of "); | public static String list(File file) { StringBuffer sb = new StringBuffer(); sb.append("<html>"); sb.append("<head>"); sb.append("<title>Directory listing of "); sb.append(file.getPath()); sb.append("</title>"); sb.append("<style>"); sb.append("table { backgro... |
sb.append(" is</p>"); | sb.append(" are:</p>"); | public static String list(File file) { StringBuffer sb = new StringBuffer(); sb.append("<html>"); sb.append("<head>"); sb.append("<title>Directory listing of "); sb.append(file.getPath()); sb.append("</title>"); sb.append("<style>"); sb.append("table { backgro... |
sb.append("<table>"); | sb.append("<ul>"); | public static String list(File file) { StringBuffer sb = new StringBuffer(); sb.append("<html>"); sb.append("<head>"); sb.append("<title>Directory listing of "); sb.append(file.getPath()); sb.append("</title>"); sb.append("<style>"); sb.append("table { backgro... |
sb.append("<tr>"); | sb.append("<li>"); | public static String list(File file) { StringBuffer sb = new StringBuffer(); sb.append("<html>"); sb.append("<head>"); sb.append("<title>Directory listing of "); sb.append(file.getPath()); sb.append("</title>"); sb.append("<style>"); sb.append("table { backgro... |
sb.append("<td class='dir'>" + files[i].getName() + "</td>"); | sb.append("<a class='dir' href='" + files[i].getAbsolutePath() + "'>" + files[i].getName() + "</a>"); | public static String list(File file) { StringBuffer sb = new StringBuffer(); sb.append("<html>"); sb.append("<head>"); sb.append("<title>Directory listing of "); sb.append(file.getPath()); sb.append("</title>"); sb.append("<style>"); sb.append("table { backgro... |
sb.append("<td class='file'>" + files[i].getName() + "</td>"); | sb.append("<a class='file' href='" + files[i].getAbsolutePath() + "'>" + files[i].getName() + "</a>"); | public static String list(File file) { StringBuffer sb = new StringBuffer(); sb.append("<html>"); sb.append("<head>"); sb.append("<title>Directory listing of "); sb.append(file.getPath()); sb.append("</title>"); sb.append("<style>"); sb.append("table { backgro... |
sb.append("</tr>"); | sb.append("</li>"); | public static String list(File file) { StringBuffer sb = new StringBuffer(); sb.append("<html>"); sb.append("<head>"); sb.append("<title>Directory listing of "); sb.append(file.getPath()); sb.append("</title>"); sb.append("<style>"); sb.append("table { backgro... |
sb.append("</table>"); | sb.append("</ul>"); | public static String list(File file) { StringBuffer sb = new StringBuffer(); sb.append("<html>"); sb.append("<head>"); sb.append("<title>Directory listing of "); sb.append(file.getPath()); sb.append("</title>"); sb.append("<style>"); sb.append("table { backgro... |
sb.append("</body></html>"); | public static String list(File file) { StringBuffer sb = new StringBuffer(); sb.append("<html>"); sb.append("<head>"); sb.append("<title>Directory listing of "); sb.append(file.getPath()); sb.append("</title>"); sb.append("<style>"); sb.append("table { backgro... | |
ServerManagement.deInit(); | public void tearDown() throws Exception { producerConnection.close(); consumerConnection.close(); ServerManagement.undeployQueue("Queue"); ServerManagement.deInit(); super.tearDown(); } | |
if (ypos != viewPosition.x) | if (ypos != viewPosition.y) | public void stateChanged(ChangeEvent event) { JScrollBar vsb = scrollpane.getVerticalScrollBar(); JViewport vp = scrollpane.getViewport(); Point viewPosition = vp.getViewPosition(); int ypos = vsb.getValue(); if (ypos != viewPosition.x) { viewPosition.y = ypos; v... |
Dimension extents = vp.getExtentSize(); if (extents.width != hsb.getModel().getExtent() || extents.height != vsb.getModel().getExtent()) | public void stateChanged(ChangeEvent event) { JViewport vp = scrollpane.getViewport(); JScrollBar hsb = scrollpane.getHorizontalScrollBar(); JScrollBar vsb = scrollpane.getVerticalScrollBar(); Dimension extents = vp.getExtentSize(); if (extents.width != hsb.getModel().getExtent() ... | |
installKeyboardActions((JScrollPane) c); | public void installUI(final JComponent c) { super.installUI(c); installDefaults((JScrollPane) c); installListeners((JScrollPane) c); } | |
JScrollBar hsb = scrollpane.getHorizontalScrollBar(); hsb.getModel().setExtent(vp.getExtentSize().width); vsb.getModel().setExtent(vp.getExtentSize().height); | vsb.setMaximum(vp.getViewSize().height); vsb.setValue(vp.getViewPosition().y); vsb.setVisibleAmount(vp.getExtentSize().height); | protected void syncScrollPaneWithViewport() { JViewport vp = scrollpane.getViewport(); JScrollBar vsb = scrollpane.getVerticalScrollBar(); JScrollBar hsb = scrollpane.getHorizontalScrollBar(); hsb.getModel().setExtent(vp.getExtentSize().width); vsb.getModel().setExtent(vp.getExtentSize().height); } |
installKeyboardActions((JScrollPane) c); | public void uninstallUI(final JComponent c) { super.uninstallUI(c); this.uninstallDefaults((JScrollPane)c); uninstallListeners((JScrollPane) c); } | |
public Object registerVariable(WorkflowContext context, WorkflowEntry entry, Map args) throws WorkflowException { | public Object registerVariable(WorkflowContext context, WorkflowEntry entry, Map args, PropertySet ps) throws WorkflowException { | public Object registerVariable(WorkflowContext context, WorkflowEntry entry, Map args) throws WorkflowException { String ejbLocation = (String) args.get(AbstractWorkflow.EJB_LOCATION); Register sessionBean = null; try { EJBLocalHome home = (EJBLocalHome) PortableRemoteObject.narrow(n... |
Register sessionBean = null; | Register sessionBean; | public Object registerVariable(WorkflowContext context, WorkflowEntry entry, Map args) throws WorkflowException { String ejbLocation = (String) args.get(AbstractWorkflow.EJB_LOCATION); Register sessionBean = null; try { EJBLocalHome home = (EJBLocalHome) PortableRemoteObject.narrow(n... |
return sessionBean.registerVariable(context, entry, args); | return sessionBean.registerVariable(context, entry, args, ps); | public Object registerVariable(WorkflowContext context, WorkflowEntry entry, Map args) throws WorkflowException { String ejbLocation = (String) args.get(AbstractWorkflow.EJB_LOCATION); Register sessionBean = null; try { EJBLocalHome home = (EJBLocalHome) PortableRemoteObject.narrow(n... |
int height = table.columnHeight[j] / table.columnRows[j]; if (height > row.height) { row.height = height; | int height = table.columnHeight[j] / table.columnRows[j]; if (height > row.height) { row.height = height; } table.columnHeight[j] -= height; table.columnRows[j]--; | private static void layoutCells(List cells, LayoutContext c, RowBox row, TableBox table, boolean fixed, int borderSpacingHorizontal, int borderSpacingVertical) { int col = 0; for (Iterator i = cells.iterator(); i.hasNext() && !c.shouldStop();) { checkColumns(table, col + 1); whil... |
table.columnHeight[j] -= height; table.columnRows[j]--; } | private static void layoutCells(List cells, LayoutContext c, RowBox row, TableBox table, boolean fixed, int borderSpacingHorizontal, int borderSpacingVertical) { int col = 0; for (Iterator i = cells.iterator(); i.hasNext() && !c.shouldStop();) { checkColumns(table, col + 1); whil... | |
if (block instanceof BlockBox && block.getStyle().isListItem() && ((BlockBox)block).getStructMetrics() == null) { StrutMetrics strutMetrics = InlineBoxing.createDefaultStrutMetrics(c, block); ((BlockBox)block).setStructMetrics(strutMetrics); } | private static Box layout(LayoutContext c, Box block, Content content, StyleSetListener listener) { //OK, first set up the current style. All depends on this... CascadedStyle pushed = content.getStyle(); if (pushed != null) { c.pushStyle(pushed); } Rectangle oe = c.getE... | |
1, numMessages, System.currentTimeMillis() + 10000, null); | 1, numMessages, null); | protected BrowserJob createDefaultBrowserJob(String destName) { return new BrowserJob(slaveURLs[0], jndiProperties, destName, connectionFactoryJndiName, 1, 1, numMessages, System.currentTimeMillis() + 10000, null); } |
1, false, 0, numMessages, System.currentTimeMillis() + 10000, | 1, false, 0, numMessages, | protected ReceiverJob createDefaultReceiverJob(String destName) { return new ReceiverJob(slaveURLs[0], jndiProperties, destName, connectionFactoryJndiName, 1, 1, false, 0, numMessages, System.currentTimeMillis() + 10000, Session.AUTO_ACKNOWLEDGE, null, null, false, false, null); } |
1, false, 0, numMessages, System.currentTimeMillis() + 20000, | 1, false, 0, numMessages, | protected SenderJob createDefaultSenderJob(String destName) { return new SenderJob(slaveURLs[0], jndiProperties, destName, connectionFactoryJndiName, 1, 1, false, 0, numMessages, System.currentTimeMillis() + 20000, false, standardMessageSize, new TextMessageMessageFactory(), ... |
new TextMessageMessageFactory(), DeliveryMode.NON_PERSISTENT, 0); | new TextMessageMessageFactory(), DeliveryMode.NON_PERSISTENT); | protected SenderJob createDefaultSenderJob(String destName) { return new SenderJob(slaveURLs[0], jndiProperties, destName, connectionFactoryJndiName, 1, 1, false, 0, numMessages, System.currentTimeMillis() + 20000, false, standardMessageSize, new TextMessageMessageFactory(), ... |
protected boolean drainQueue(String queueName) | protected void drainQueue(String queueName) throws PerfException | protected boolean drainQueue(String queueName) { Job drainJob = createDefaultDrainJob(queueName); JobResult res = runJob(drainJob); if (res.failed) { log.error("Failed to drain queue", res.throwables[0]); return false; } return true; } |
JobResult res = runJob(drainJob); if (res.failed) { log.error("Failed to drain queue", res.throwables[0]); return false; } return true; | runJob(drainJob); | protected boolean drainQueue(String queueName) { Job drainJob = createDefaultDrainJob(queueName); JobResult res = runJob(drainJob); if (res.failed) { log.error("Failed to drain queue", res.throwables[0]); return false; } return true; } |
protected boolean drainSubscription(String topicName, String subName, String clientID) | protected void drainSubscription(String topicName, String subName, String clientID) throws PerfException | protected boolean drainSubscription(String topicName, String subName, String clientID) { DrainJob drainJob = createDefaultDrainJob(topicName); drainJob.setClientID(clientID); drainJob.setSubName(subName); JobResult res = runJob(drainJob); if (res.failed) { log.error("Fai... |
JobResult res = runJob(drainJob); if (res.failed) { log.error("Failed to drain subscription", res.throwables[0]); return false; } return true; | runJob(drainJob); | protected boolean drainSubscription(String topicName, String subName, String clientID) { DrainJob drainJob = createDefaultDrainJob(topicName); drainJob.setClientID(clientID); drainJob.setSubName(subName); JobResult res = runJob(drainJob); if (res.failed) { log.error("Fai... |
new PerfRunner().run(); | try { new PerfRunner().run(); } catch (PerfException e) { log.error("Failed to run perf tests", e.getCause()); } | public static void main(String[] args) { new PerfRunner().run(); } |
public void run() | public void run() throws PerfException | public void run() { setUp(); //Only need to do once - junit does for every test testQueue1(); testQueue2(); testQueue3(); testQueue4(); testQueue5(); testQueue6(); testQueue7(); testQueue8(); testQueue9(); testQueue10(); testQueue11(); testQueu... |
testTopic9(); testTopic10(); | public void run() { setUp(); //Only need to do once - junit does for every test testQueue1(); testQueue2(); testQueue3(); testQueue4(); testQueue5(); testQueue6(); testQueue7(); testQueue8(); testQueue9(); testQueue10(); testQueue11(); testQueu... | |
testMessageSizeThroughput2(); | public void run() { setUp(); //Only need to do once - junit does for every test testQueue1(); testQueue2(); testQueue3(); testQueue4(); testQueue5(); testQueue6(); testQueue7(); testQueue8(); testQueue9(); testQueue10(); testQueue11(); testQueu... | |
protected JobResult runJob(Job job) | protected JobResult runJob(Job job) throws PerfException | protected JobResult runJob(Job job) { if (local) { job.run(); return job.getResult(); } else { return sendRequestToSlave(job.getSlaveURL(), new RunRequest(job)); } } |
job.run(); return job.getResult(); | job.initialize(); return job.execute(); | protected JobResult runJob(Job job) { if (local) { job.run(); return job.getResult(); } else { return sendRequestToSlave(job.getSlaveURL(), new RunRequest(job)); } } |
return sendRequestToSlave(job.getSlaveURL(), new RunRequest(job)); | sendRequestToSlave(job.getSlaveURL(), new SubmitJobRequest(job)); return sendRequestToSlave(job.getSlaveURL(), new ExecuteJobRequest(job.getId())); | protected JobResult runJob(Job job) { if (local) { job.run(); return job.getResult(); } else { return sendRequestToSlave(job.getSlaveURL(), new RunRequest(job)); } } |
protected JobResult[] runJobs(Job[] jobs) | protected JobResult[] runJobs(Job[] jobs) throws PerfException | protected JobResult[] runJobs(Job[] jobs) { JobRunner[] runners = new JobRunner[jobs.length]; for (int i = 0; i < jobs.length; i++) { runners[i] = new JobRunner(jobs[i]); Thread t = new Thread(runners[i]); runners[i].thread = t; t.start(); } for ... |
JobRunner[] runners = new JobRunner[jobs.length]; | JobInitializer[] initializers = new JobInitializer[jobs.length]; | protected JobResult[] runJobs(Job[] jobs) { JobRunner[] runners = new JobRunner[jobs.length]; for (int i = 0; i < jobs.length; i++) { runners[i] = new JobRunner(jobs[i]); Thread t = new Thread(runners[i]); runners[i].thread = t; t.start(); } for ... |
runners[i] = new JobRunner(jobs[i]); | initializers[i] = new JobInitializer(jobs[i]); Thread t = new Thread(initializers[i]); initializers[i].thread = t; t.start(); } for (int i = 0; i < jobs.length; i++) { try { initializers[i].thread.join(); } catch (InterruptedException e) {} if (initializers[i].exception != null) { throw initializers[i].exception; } }... | protected JobResult[] runJobs(Job[] jobs) { JobRunner[] runners = new JobRunner[jobs.length]; for (int i = 0; i < jobs.length; i++) { runners[i] = new JobRunner(jobs[i]); Thread t = new Thread(runners[i]); runners[i].thread = t; t.start(); } for ... |
protected void runMessageTypeJob(Execution execution, MessageFactory mf, String messageType, int type) | protected void runMessageTypeJob(Execution execution, MessageFactory mf, String messageType, int type) throws PerfException | protected void runMessageTypeJob(Execution execution, MessageFactory mf, String messageType, int type) { SenderJob sender = createDefaultSenderJob(queueName); sender.setNumMessages(numMessages); sender.setMsgSize(4096); sender.setMf(mf); sender.setTransacted(false); sender.setDe... |
long totalTimeTaken = results[1].endTime - results[0].startTime; | long totalTimeTaken = results[1].getEndTime() - results[0].getStartTime(); | protected void runMessageTypeJob(Execution execution, MessageFactory mf, String messageType, int type) { SenderJob sender = createDefaultSenderJob(queueName); sender.setNumMessages(numMessages); sender.setMsgSize(4096); sender.setMf(mf); sender.setTransacted(false); sender.setDe... |
protected JobResult sendRequestToSlave(String slaveURL, ServerRequest request) | protected JobResult sendRequestToSlave(String slaveURL, ServerRequest request) throws PerfException | protected JobResult sendRequestToSlave(String slaveURL, ServerRequest request) { try { InvokerLocator locator = new InvokerLocator(slaveURL); Client client = new Client(locator, "perftest"); Object res = client.invoke(request); return (JobResult)... |
return (JobResult)res; | return (JobResult)res; } catch (PerfException e) { throw e; | protected JobResult sendRequestToSlave(String slaveURL, ServerRequest request) { try { InvokerLocator locator = new InvokerLocator(slaveURL); Client client = new Client(locator, "perftest"); Object res = client.invoke(request); return (JobResult)... |
log.error("Failed to run job", t); return null; | throw new PerfException("Failed to invoke", t); | protected JobResult sendRequestToSlave(String slaveURL, ServerRequest request) { try { InvokerLocator locator = new InvokerLocator(slaveURL); Client client = new Client(locator, "perftest"); Object res = client.invoke(request); return (JobResult)... |
public void testMessageTypes() | public void testMessageTypes() throws PerfException | public void testMessageTypes() { log.info("Running test MessageTypes"); Execution execution = createExecution("MessageTypes"); runMessageTypeJob(execution, new MessageMessageFactory(), "javax.jms.Message", 1); runMessageTypeJob(execution, new BytesMessageMessageFactory(), "javax.jms... |
public void testQueue1() | public void testQueue1() throws PerfException | public void testQueue1() { try { log.info("Running test Queue1"); SenderJob sender = createDefaultSenderJob(queueName); sender.setNumMessages(numMessages); sender.setMsgSize(standardMessageSize); sender.setMf(new TextMessageMessageFactory()); sende... |
JobResult res = runJob(sender); if (!checkResult(res, "Queue1")) { return; } long result = res.endTime - res.startTime; | long result = res.getEndTime() - res.getStartTime(); | public void testQueue1() { try { log.info("Running test Queue1"); SenderJob sender = createDefaultSenderJob(queueName); sender.setNumMessages(numMessages); sender.setMsgSize(standardMessageSize); sender.setMf(new TextMessageMessageFactory()); sende... |
public void testQueue10() | public void testQueue10() throws PerfException | public void testQueue10() { log.info("Running test Queue10"); SenderJob sender = createDefaultSenderJob(queueName); sender.setNumMessages(numMessages); sender.setMsgSize(standardMessageSize); sender.setMf(new TextMessageMessageFactory()); sender.setTransacted(false); sender... |
if (!checkResults(results, "Queue10")) { return; } long totalTimeTaken = results[1].endTime - results[0].startTime; | long totalTimeTaken = results[1].getEndTime() - results[0].getStartTime(); | public void testQueue10() { log.info("Running test Queue10"); SenderJob sender = createDefaultSenderJob(queueName); sender.setNumMessages(numMessages); sender.setMsgSize(standardMessageSize); sender.setMf(new TextMessageMessageFactory()); sender.setTransacted(false); sender... |
public void testQueue11() | public void testQueue11() throws PerfException | public void testQueue11() { log.info("Running test Queue11"); //Now fill it with numMessages messages FillJob fillJob = createDefaultFillJob(queueName, numMessages); fillJob.setDeliveryMode(DeliveryMode.PERSISTENT); fillJob.setMsgSize(standardMessageSize); fillJob.setMf(new Text... |
if (!checkResult(result, "Queue11")) { return; } | public void testQueue11() { log.info("Running test Queue11"); //Now fill it with numMessages messages FillJob fillJob = createDefaultFillJob(queueName, numMessages); fillJob.setDeliveryMode(DeliveryMode.PERSISTENT); fillJob.setMsgSize(standardMessageSize); fillJob.setMf(new Text... | |
execution.addMeasurement(new Measurement("msgsReceivedPerSec", (double)(numMessages * 1000) / (result.endTime - result.startTime))); | execution.addMeasurement(new Measurement("msgsReceivedPerSec", (double)(numMessages * 1000) / (result.getEndTime() - result.getStartTime()))); | public void testQueue11() { log.info("Running test Queue11"); //Now fill it with numMessages messages FillJob fillJob = createDefaultFillJob(queueName, numMessages); fillJob.setDeliveryMode(DeliveryMode.PERSISTENT); fillJob.setMsgSize(standardMessageSize); fillJob.setMf(new Text... |
public void testQueue12() | public void testQueue12() throws PerfException | public void testQueue12() { log.info("Running test Queue12"); //Now fill it with numMessages messages FillJob fillJob = createDefaultFillJob(queueName, numMessages); fillJob.setDeliveryMode(DeliveryMode.NON_PERSISTENT); fillJob.setMsgSize(standardMessageSize); fillJob.setMf(new ... |
if (!checkResult(result, "Queue12")) { return; } | public void testQueue12() { log.info("Running test Queue12"); //Now fill it with numMessages messages FillJob fillJob = createDefaultFillJob(queueName, numMessages); fillJob.setDeliveryMode(DeliveryMode.NON_PERSISTENT); fillJob.setMsgSize(standardMessageSize); fillJob.setMf(new ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.