public class HBaseSubscriptionMapper extends HBaseNonTransactionalMapper implements SubscriptionMapper
SubscriptionMapper
.
I don't know if this class is thread-safe!Mapper.Transaction<T>, Mapper.VoidTransaction
Constructor and Description |
---|
HBaseSubscriptionMapper(org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
void |
delete(Subscription subscription)
Deletes the given subscription.
|
Subscription |
findMailboxSubscriptionForUser(String user,
String mailbox)
Finds any subscriptions for a given user to the given mailbox.
|
List<Subscription> |
findSubscriptionsForUser(String user)
Finds subscriptions for the given user.
|
void |
save(Subscription subscription)
Saves the given subscription.
|
endRequest
execute
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
endRequest, execute
public HBaseSubscriptionMapper(org.apache.hadoop.conf.Configuration conf)
public Subscription findMailboxSubscriptionForUser(String user, String mailbox) throws SubscriptionException
SubscriptionMapper
findMailboxSubscriptionForUser
in interface SubscriptionMapper
user
- not nullmailbox
- not nullSubscription
,
or null when the user is not subscribed to the given mailboxSubscriptionException
public void save(Subscription subscription) throws SubscriptionException
SubscriptionMapper
save
in interface SubscriptionMapper
subscription
- not nullSubscriptionException
SubscriptionMapper.save(Subscription)
public List<Subscription> findSubscriptionsForUser(String user) throws SubscriptionException
SubscriptionMapper
findSubscriptionsForUser
in interface SubscriptionMapper
user
- not nullSubscriptionException
SubscriptionMapper.findSubscriptionsForUser(java.lang.String)
public void delete(Subscription subscription) throws SubscriptionException
SubscriptionMapper
delete
in interface SubscriptionMapper
subscription
- not nullSubscriptionException
SubscriptionMapper.delete(Subscription)
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.