Skip to content
This repository has been archived by the owner on Mar 27, 2018. It is now read-only.

Commit

Permalink
Merge branch 'master' into spg_update
Browse files Browse the repository at this point in the history
  • Loading branch information
gerring authored Feb 28, 2017
2 parents 6901dd3 + e83b0fd commit a7efea6
Show file tree
Hide file tree
Showing 26 changed files with 1,363 additions and 1,112 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
*/
public class MalcolmModel extends AbstractDetectorModel implements IMalcolmModel {

public MalcolmModel() {
setTimeout(60*24); // 1 Day
}
/**
* The folder for malcolm to create its HDF5 files in. This is set by the scan, any value
* set by the user will be overwritten.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ public interface IConsumer<T> extends IQueueConnection<T> {
*/
void stop() throws EventException;

/**
* Awaits the start of the consumer. There are occasions
* when the consumer should start in its own thread but
* still provide the ability to await the startup process.
*
* @throws Exception
*/
void awaitStart() throws InterruptedException;

/**
* Starts the consumer and block. Similar to Thread.run()
Expand Down Expand Up @@ -141,6 +149,36 @@ default ConsumerStatus getConsumerStatus() {
*/
public boolean isActive();

/**
* Durable consumers try to keep going when there are exceptions.
* @return
*/
public boolean isDurable();

/**
* Durable consumers try to keep going when there are exceptions.
* @param durable
*/
public void setDurable(boolean durable);

/**
* If the consumer should pause when it is started with
* jobs in the queue and wait until the user requires it to unpause.
*
* NOTE: setPauseOnStartup(...) must be called before the consumer is started!
*
* @return
*/
boolean isPauseOnStart();

/**
* If the consumer should pause when it is started with
* jobs in the queue and wait until the user requires it to unpause.
*
* NOTE: setPauseOnStartup(...) must be called before the consumer is started!
*
* @param pauseOnStart
*/
void setPauseOnStart(boolean pauseOnStart);

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* @author Matthew Gerring
*
*/
@FunctionalInterface
public interface IDisconnectable {

/**
Expand All @@ -34,5 +35,7 @@ public interface IDisconnectable {
/**
*
*/
public boolean isDisconnected();
default boolean isDisconnected() {
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,12 @@
import java.net.URISyntaxException;

import org.eclipse.scanning.api.event.EventException;
import org.eclipse.scanning.api.event.core.IDisconnectable;

public interface IConnectable {
public interface IConnectable extends IDisconnectable {
/**
* Should called to start the servlet.
* @param uri, a string representation of the activemq uri.
*/
public void connect() throws EventException, URISyntaxException;

/**
* Should called to stop the servlet but if it is not called
* the servlet will run the lifetime of the server.
*
* This is acceptable if it is a service client(s) may demand at
* any time.
*/
public void disconnect() throws EventException;

}
Loading

0 comments on commit a7efea6

Please sign in to comment.