public class EventPublisher extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_POOL_SIZE
DEFAULT.
|
static int |
DEFAULT_QUEUE_CAPACITY
DEFAULT.
|
static long |
timeout
2s to save the event other wize skip.
|
| Constructor and Description |
|---|
EventPublisher()
Default constructor.
|
EventPublisher(EventRepository er)
Default constructor.
|
EventPublisher(EventRepository er,
ExecutorService executorService) |
EventPublisher(EventRepository er,
ExecutorService executorService,
long submitTimeout) |
EventPublisher(int queueCapacity,
int poolSize,
EventRepository er)
Default constructor.
|
EventPublisher(int queueCapacity,
int poolSize,
EventRepository er,
long submitTimeout)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
EventRepository |
getRepository()
Getter accessor for attribute 'repository'.
|
void |
publish(Event e)
Publish event to repository
|
void |
publish(String featureName,
boolean flipped)
Parameterized constructor.
|
void |
publish(String featureName,
EventType type)
Publish event to repository.
|
void |
setRepository(EventRepository repository)
Setter accessor for attribute 'repository'.
|
void |
stop()
Stops the event publisher.
|
public static final int DEFAULT_QUEUE_CAPACITY
public static final int DEFAULT_POOL_SIZE
public static long timeout
public EventPublisher()
public EventPublisher(EventRepository er)
public EventPublisher(int queueCapacity,
int poolSize,
EventRepository er)
public EventPublisher(int queueCapacity,
int poolSize,
EventRepository er,
long submitTimeout)
public EventPublisher(EventRepository er, ExecutorService executorService)
er - the event repository to useexecutorService - the executor servicepublic EventPublisher(EventRepository er, ExecutorService executorService, long submitTimeout)
er - the event repository to useexecutorService - the executor servicesubmitTimeout - public void publish(Event e)
e - event.public void publish(String featureName, EventType type)
featureName - target feature nametype - event typepublic void publish(String featureName, boolean flipped)
featureName - target feature nameflipped - if flippedpublic void stop()
public void setRepository(EventRepository repository)
repository - new value for 'repository 'public EventRepository getRepository()
Copyright © 2013–2015 FF4J. All rights reserved.