public class HBaseMailboxMapper extends HBaseNonTransactionalMapper implements MailboxMapper<UUID>
Mapper.Transaction<T>, Mapper.VoidTransaction
Constructor and Description |
---|
HBaseMailboxMapper(org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
void |
delete(Mailbox<UUID> mlbx)
Delete the given
Mailbox from the underlying storage |
void |
deleteAllMailboxes() |
void |
deleteAllMemberships() |
void |
endRequest()
End request
|
Mailbox<UUID> |
findMailboxByPath(MailboxPath mailboxPath)
Return the
Mailbox for the given name |
List<Mailbox<UUID>> |
findMailboxWithPathLike(MailboxPath mailboxPath)
Return a List of
Mailbox which name is like the given name |
boolean |
hasChildren(Mailbox<UUID> mailbox,
char c)
Return if the given
Mailbox has children |
List<Mailbox<UUID>> |
list()
|
void |
save(Mailbox<UUID> mlbx)
Save the give
Mailbox to the underlying storage |
execute
public HBaseMailboxMapper(org.apache.hadoop.conf.Configuration conf)
public Mailbox<UUID> findMailboxByPath(MailboxPath mailboxPath) throws MailboxException, MailboxNotFoundException
MailboxMapper
Mailbox
for the given namefindMailboxByPath
in interface MailboxMapper<UUID>
MailboxException
MailboxNotFoundException
public List<Mailbox<UUID>> findMailboxWithPathLike(MailboxPath mailboxPath) throws MailboxException
MailboxMapper
Mailbox
which name is like the given namefindMailboxWithPathLike
in interface MailboxMapper<UUID>
MailboxException
public List<Mailbox<UUID>> list() throws MailboxException
MailboxMapper
list
in interface MailboxMapper<UUID>
MailboxException
public void endRequest()
HBaseNonTransactionalMapper
endRequest
in interface Mapper
endRequest
in class HBaseNonTransactionalMapper
public void save(Mailbox<UUID> mlbx) throws MailboxException
MailboxMapper
Mailbox
to the underlying storagesave
in interface MailboxMapper<UUID>
MailboxException
public void delete(Mailbox<UUID> mlbx) throws MailboxException
MailboxMapper
Mailbox
from the underlying storagedelete
in interface MailboxMapper<UUID>
MailboxException
public boolean hasChildren(Mailbox<UUID> mailbox, char c) throws MailboxException, MailboxNotFoundException
MailboxMapper
Mailbox
has childrenhasChildren
in interface MailboxMapper<UUID>
mailbox
- not nullc
- path delimiterMailboxException
MailboxNotFoundException
public void deleteAllMemberships()
public void deleteAllMailboxes()
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.