|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.usergrid.persistence.cassandra.EntityManagerFactoryImpl
public class EntityManagerFactoryImpl
Cassandra-specific implementation of Datastore
Field Summary | |
---|---|
static Class<DynamicEntity> |
APPLICATION_ENTITY_CLASS
|
static me.prettyprint.cassandra.serializers.BytesArraySerializer |
bae
|
static me.prettyprint.cassandra.serializers.ByteBufferSerializer |
be
|
static me.prettyprint.cassandra.serializers.DynamicCompositeSerializer |
dce
|
static String |
IMPLEMENTATION_DESCRIPTION
|
static me.prettyprint.cassandra.serializers.LongSerializer |
le
|
static me.prettyprint.cassandra.serializers.StringSerializer |
se
|
static me.prettyprint.cassandra.serializers.UUIDSerializer |
ue
|
Constructor Summary | |
---|---|
EntityManagerFactoryImpl(CassandraService cass,
CounterUtils counterUtils,
boolean skipAggregateCounters)
Must be constructed with a CassandraClientPool. |
Method Summary | |
---|---|
UUID |
createApplication(String organization,
String name)
Creates a new application. |
UUID |
createApplication(String organizationName,
String name,
Map<String,Object> properties)
Creates a Application entity. |
boolean |
deleteServiceProperty(String name)
|
Application |
getApplication(String name)
Gets the application. |
org.springframework.context.ApplicationContext |
getApplicationContext()
|
Map<String,UUID> |
getApplications()
Returns all the applications in the system. |
EntityManager |
getEntityManager(UUID applicationId)
Gets the entity manager. |
String |
getImpementationDescription()
A string description provided by the implementing class. |
Map<String,String> |
getServiceProperties()
|
Setup |
getSetup()
Gets the setup. |
UUID |
importApplication(String organizationName,
UUID applicationId,
String name,
Map<String,Object> properties)
|
UUID |
initializeApplication(String organizationName,
UUID applicationId,
String name,
Map<String,Object> properties)
|
UUID |
lookupApplication(String name)
Returns the application id for the application name. |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
|
void |
setCounterUtils(CounterUtils counterUtils)
|
boolean |
setServiceProperty(String name,
String value)
|
void |
setup()
|
boolean |
updateServiceProperties(Map<String,String> properties)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String IMPLEMENTATION_DESCRIPTION
public static final Class<DynamicEntity> APPLICATION_ENTITY_CLASS
public static final me.prettyprint.cassandra.serializers.StringSerializer se
public static final me.prettyprint.cassandra.serializers.ByteBufferSerializer be
public static final me.prettyprint.cassandra.serializers.UUIDSerializer ue
public static final me.prettyprint.cassandra.serializers.BytesArraySerializer bae
public static final me.prettyprint.cassandra.serializers.DynamicCompositeSerializer dce
public static final me.prettyprint.cassandra.serializers.LongSerializer le
Constructor Detail |
---|
public EntityManagerFactoryImpl(CassandraService cass, CounterUtils counterUtils, boolean skipAggregateCounters)
cass
- the cassandraService instanceMethod Detail |
---|
public String getImpementationDescription()
EntityManagerFactory
getImpementationDescription
in interface EntityManagerFactory
public EntityManager getEntityManager(UUID applicationId)
EntityManagerFactory
getEntityManager
in interface EntityManagerFactory
applicationId
- the application id
public org.springframework.context.ApplicationContext getApplicationContext()
public Setup getSetup()
public void setup() throws Exception
setup
in interface EntityManagerFactory
Exception
public UUID createApplication(String organization, String name) throws Exception
EntityManagerFactory
createApplication
in interface EntityManagerFactory
name
- a unique application name.
Exception
- the exceptionpublic UUID createApplication(String organizationName, String name, Map<String,Object> properties) throws Exception
EntityManagerFactory
createApplication
in interface EntityManagerFactory
name
- the name of the application to create.properties
- property values to create in the new entity or null.
Exception
- the exceptionpublic UUID initializeApplication(String organizationName, UUID applicationId, String name, Map<String,Object> properties) throws Exception
Exception
public UUID importApplication(String organizationName, UUID applicationId, String name, Map<String,Object> properties) throws Exception
importApplication
in interface EntityManagerFactory
Exception
public UUID lookupApplication(String name) throws Exception
EntityManagerFactory
lookupApplication
in interface EntityManagerFactory
name
- a unique application name.
Exception
- the exceptionpublic Application getApplication(String name) throws Exception
name
- the name
Exception
- the exceptionpublic Map<String,UUID> getApplications() throws Exception
EntityManagerFactory
getApplications
in interface EntityManagerFactory
Exception
- the exceptionpublic boolean setServiceProperty(String name, String value)
setServiceProperty
in interface EntityManagerFactory
public boolean deleteServiceProperty(String name)
deleteServiceProperty
in interface EntityManagerFactory
public boolean updateServiceProperties(Map<String,String> properties)
updateServiceProperties
in interface EntityManagerFactory
public Map<String,String> getServiceProperties()
getServiceProperties
in interface EntityManagerFactory
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public void setCounterUtils(CounterUtils counterUtils)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |