Package com.yahoo.feedapi
Class SingleSender
java.lang.Object
com.yahoo.feedapi.SingleSender
- All Implemented Interfaces:
SimpleFeedAccess
Simplifies sending messages belonging to a single result callback.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMessageProcessor
(MessageProcessor processor) void
close()
void
done()
boolean
void
put
(com.yahoo.document.Document doc) void
put
(com.yahoo.document.Document doc, com.yahoo.document.TestAndSetCondition condition) void
remove
(com.yahoo.document.DocumentId docId) void
remove
(com.yahoo.document.DocumentId docId, com.yahoo.document.TestAndSetCondition condition) void
send
(com.yahoo.messagebus.Message m) Sends the given message.void
update
(com.yahoo.document.DocumentUpdate update) void
update
(com.yahoo.document.DocumentUpdate update, com.yahoo.document.TestAndSetCondition condition) boolean
waitForPending
(long timeoutMs)
-
Constructor Details
-
Method Details
-
put
public void put(com.yahoo.document.Document doc) - Specified by:
put
in interfaceSimpleFeedAccess
-
remove
public void remove(com.yahoo.document.DocumentId docId) - Specified by:
remove
in interfaceSimpleFeedAccess
-
update
public void update(com.yahoo.document.DocumentUpdate update) - Specified by:
update
in interfaceSimpleFeedAccess
-
put
public void put(com.yahoo.document.Document doc, com.yahoo.document.TestAndSetCondition condition) - Specified by:
put
in interfaceSimpleFeedAccess
-
remove
public void remove(com.yahoo.document.DocumentId docId, com.yahoo.document.TestAndSetCondition condition) - Specified by:
remove
in interfaceSimpleFeedAccess
-
update
public void update(com.yahoo.document.DocumentUpdate update, com.yahoo.document.TestAndSetCondition condition) - Specified by:
update
in interfaceSimpleFeedAccess
-
isAborted
public boolean isAborted()- Specified by:
isAborted
in interfaceSimpleFeedAccess
-
addMessageProcessor
-
send
public void send(com.yahoo.messagebus.Message m) Sends the given message.- Parameters:
m
- The message to send
-
done
public void done() -
waitForPending
public boolean waitForPending(long timeoutMs) -
close
public void close()- Specified by:
close
in interfaceSimpleFeedAccess
-