public final class EventPersister extends IRISConnection
EventPersister.java
is the main entry point for the XEP module.
It provides methods that can be used to set XEP options up, establish an XEP
connection, import schema, produce XEP Event
objects. It extends
IRISConnection which is the implementation of JDBC Connection thus allowing
JDBC calls using the same physical connection and transaction context.IRISConnection.MessageCount
Modifier and Type | Field and Description |
---|---|
byte[] |
buffer |
static int |
FETCH_LEVEL_ALL
Set this option to fetch all data (default option).
|
static int |
FETCH_LEVEL_DATATYPES_ONLY
Set this option to fetch only datatype data.
|
static int |
FETCH_LEVEL_NO_ARRAY_TYPES
Set this option to fetch all data except arrays.
|
static int |
FETCH_LEVEL_NO_COLLECTIONS
Set this option to fetch all data except collections.
|
static int |
FETCH_LEVEL_NO_OBJECT_TYPES
Set this option to fetch all non-object data.
|
byte[] |
header |
FeatureOption, inMessage, logFile, messageCount, outMessage, password, PROTOCOL_VERSION, protocolVersion, socketChannel, TRANSACTION_READ_VERIFIED, user
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
Constructor and Description |
---|
EventPersister() |
Modifier and Type | Method and Description |
---|---|
void |
callApiXEP(String tag,
Object... args) |
void |
connect(String host,
int port,
String namespace,
String username,
String password)
Connect to Cache using the parameters specified below.
|
void |
connect(String host,
int port,
String namespace,
String username,
String password,
String log)
Connect to Cache using the parameters specified below.
|
void |
deleteClass(String className)
Deletes a COS class.
|
void |
deleteExtent(String className)
Deletes all objects in the given extent.
|
boolean |
exists(com.intersystems.xep.internal.AbstractClassInfo classInfo,
Object[] ids)
Note: This method is for internal use only.
|
com.intersystems.xep.internal.ClassInfo |
getClassInfo(Class clazz)
Note: This method is for internal use only.
|
com.intersystems.xep.internal.ClassInfo |
getClassInfo(String className)
Note: This method is for internal use only.
|
com.intersystems.xep.internal.DynamicClassInfo |
getClassInfo(String table,
String[] columns,
Class[] types) |
ListReader |
getData(String globalName,
String idKeys)
Note: This method is for internal use only.
|
DynamicEvent |
getDynamicEvent(String table,
String[] columns,
Class[] types,
int indexMode) |
Event |
getEvent(String className)
Returns an event object that corresponds to the supplied class name.
|
Event |
getEvent(String className,
int indexMode)
Returns an event object that corresponds to the supplied class name.
|
int |
getFetchLevel()
Returns the current fetch level.
|
String |
getGlobalName(String className)
Return the name of the corresponding Cache global where the data is stored.
|
InterfaceResolver |
getInterfaceResolver()
Returns currently set InterfaceResolver.
|
void |
importClass(String classText) |
String[] |
importSchema(String classOrJarFileName)
If parameter is a class name, import the corresponding class
and any dependencies.
|
String[] |
importSchema(String[] classNames)
Import the given classes and any dependencies.
|
String[] |
importSchemaFull(String classOrJarFileName)
See importSchema(String classOrJarFileName) for more info.
|
String[] |
importSchemaFull(String[] classNames)
See importSchema(String[] classes) for more info.
|
static void |
isEvent(Type type,
ArrayDeque<Type> typeStack) |
boolean |
isSchemaUpToDate(Class clazz)
Compares a given Java Class with the corresponding class on the server
to determine if the versions are compatible and class can be used in XEP.
|
void |
setClassLoader(ClassLoader loader)
Sets ClassLoader.
|
void |
setFetchLevel(int level)
Sets the fetch level.
|
void |
setInterfaceResolver(InterfaceResolver interfaceResolver)
Sets InterfaceResolver.
|
boolean |
skipArrays()
Note: This method is for internal use only.
|
boolean |
skipCollections()
Note: This method is for internal use only.
|
boolean |
skipObjects()
Note: This method is for internal use only.
|
void |
startTransaction()
Start a transaction (which may be a nested transaction).
|
void |
store(byte[] globalBytes,
int globalBytesLength,
byte[] data,
int dataLength)
Note: This method is for internal use only.
|
void |
store(String global,
String id,
byte[] data,
int dataLength)
Note: This method is for internal use only.
|
long |
storeLong(byte[] globalBytes,
int globalBytesLength,
byte[] data,
int dataLength)
Note: This method is for internal use only.
|
void |
writeHeader(byte function,
int p0,
int p4,
int p8) |
abort, checkOutStandingFetches, clearWarnings, close, commit, connect, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getConnectionInfo, getHoldability, getHostAddress, getInMessage, getIRISJobID, getIRISResultSet, getListWriter, getListWriter, getMaster, getMetaData, getNamespaces, getNamespaces, getNetworkTimeout, getOutMessage, getProperty, getProperty, getProtocolVersion, getQueryPrefetchSize, getSchema, getServerLocale, getSQLDialect, getStatementMaxCacheSize, getStreamPrefetchSize, getTransactionIsolation, getTypeMap, getWarnings, inTransaction, isClosed, isReadOnly, isServerUnicode, isTwoFactorEnabled, isUsingSharedMemory, isValid, nativeSQL, ping, ping, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, recycleListWriter, releaseSavepoint, rollback, rollback, sendTwoFactorToken, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setConnectionInfo, setHoldability, setIRISJobID, setNetworkTimeout, setQueryPrefetchSize, setReadOnly, setSavepoint, setSavepoint, setSchema, setSQLDialect, setStatementMaxCacheSize, setStreamPrefetchSize, setTransactionIsolation, setTypeMap, xepCall, xepCallError, xepCallReturn, xepCallReturnListByteArrays, xepSendBytes
isWrapperFor, unwrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isWrapperFor, unwrap
public static final int FETCH_LEVEL_ALL
public static final int FETCH_LEVEL_DATATYPES_ONLY
public static final int FETCH_LEVEL_NO_ARRAY_TYPES
public static final int FETCH_LEVEL_NO_OBJECT_TYPES
public static final int FETCH_LEVEL_NO_COLLECTIONS
public byte[] buffer
public byte[] header
public final void connect(String host, int port, String namespace, String username, String password)
host
- host addressport
- port numbernamespace
- Cache namespace to connect tousername
- usernamepassword
- passwordpublic final void connect(String host, int port, String namespace, String username, String password, String log)
host
- host addressport
- port numbernamespace
- Cache namespace to connect tousername
- usernamepassword
- passwordlog
- logpublic final Event getEvent(String className)
className
- name of the Java classpublic final Event getEvent(String className, int indexMode)
className
- name of the Java classindexMode
- index modepublic final DynamicEvent getDynamicEvent(String table, String[] columns, Class[] types, int indexMode)
public final String[] importSchema(String classOrJarFileName)
classOrJarFileName
- class or jar file name; if a jar file name,
all classes from that jar file will be importedpublic final String[] importSchemaFull(String classOrJarFileName)
classOrJarFileName
- class or jar file namepublic final String[] importSchemaFull(String[] classNames)
classNames
- class names to be importedpublic final String[] importSchema(String[] classNames)
classNames
- class names to be importedpublic final void setClassLoader(ClassLoader loader)
loader
- Class Loader implementationpublic final void setInterfaceResolver(InterfaceResolver interfaceResolver)
interfaceResolver
- An implementation of InterfaceResolverpublic InterfaceResolver getInterfaceResolver()
public void deleteExtent(String className)
className
- name of the Java eventpublic void deleteClass(String className)
className
- name of the class to deletepublic final void startTransaction()
public String getGlobalName(String className)
className
- class namepublic final void setFetchLevel(int level)
level
- fetch level
FETCH_LEVEL_ALL - default, all fields populated
FETCH_LEVEL_DATATYPES_ONLY - only datatype fields filled in
FETCH_LEVEL_NO_ARRAY_TYPES - all arrays will be skipped
FETCH_LEVEL_NO_OBJECT_TYPES - all object types will be skipped
FETCH_LEVEL_NO_COLLECTIONS - all collections will be skippedpublic final int getFetchLevel()
public boolean isSchemaUpToDate(Class clazz)
clazz
- Java Class to check against serverpublic com.intersystems.xep.internal.ClassInfo getClassInfo(Class clazz)
clazz
- Class objectpublic com.intersystems.xep.internal.DynamicClassInfo getClassInfo(String table, String[] columns, Class[] types)
public com.intersystems.xep.internal.ClassInfo getClassInfo(String className)
className
- class namepublic void writeHeader(byte function, int p0, int p4, int p8)
public void importClass(String classText)
public static void isEvent(Type type, ArrayDeque<Type> typeStack)
public ListReader getData(String globalName, String idKeys)
globalName
- global nameidKeys
- id keyspublic boolean exists(com.intersystems.xep.internal.AbstractClassInfo classInfo, Object[] ids)
classInfo
- class infoids
- idspublic void store(byte[] globalBytes, int globalBytesLength, byte[] data, int dataLength)
globalBytes
- global bytesglobalBytesLength
- global bytes lengthdata
- datadataLength
- data lengthpublic long storeLong(byte[] globalBytes, int globalBytesLength, byte[] data, int dataLength)
globalBytes
- global bytesglobalBytesLength
- global bytes lengthdata
- datadataLength
- data lengthpublic void store(String global, String id, byte[] data, int dataLength)
global
- globalid
- iddata
- datadataLength
- data lengthpublic final boolean skipCollections()
public final boolean skipObjects()
public final boolean skipArrays()
© 2024 InterSystems Corporation, Cambridge, MA. All rights reserved. Privacy & Terms Guarantee Accessibility