public class GemfireDAO extends Object
initPeer() method will connect this object to the GemFire
distributed system as a GemFire peer. Calling the initClient() will
connect to the distributed system as a GemFire client.
Once one of the init method is called, the rest of the methods in this DAO
can be used to query and update the store.| Constructor and Description |
|---|
GemfireDAO() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPerson(String name,
Profile profile)
Add a new person
|
void |
addPost(String author,
String text)
Add a new post from a particular user.
|
Set<String> |
getPeople()
Get this list of people in the system
|
String |
getPost(PostID post)
Get a post, given the post ID.
|
Set<PostID> |
getPosts()
Get this list of all posts in the system
|
Profile |
getProfile(String person)
Get the profile of a specific person
|
void |
initClient()
Connect to the distributed system as a client and
declare the people and posts regions
|
void |
initPeer()
Connect to the distributed system as a peer and declare
the people and posts regions.
|
public void initPeer()
public void initClient()
public void addPerson(String name, Profile profile)
name - The name of the person to add.profile - The profile for this personpublic void addPost(String author, String text)
author - the author of the posttext - the text of the postpublic Profile getProfile(String person)
person - the persons namepublic Set<PostID> getPosts()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.