|
Remote System Explorer DataStore Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.dstore.core.model.DataStore
public final class DataStore
DataStore
is the heart of the DataStore
Distributed Tooling Framework.
This class is used for creating, deleting and accessing DataElement
s and for communicating commands
to miners (tools).
Every DataStore
has both a command handler and an update handler. The command
handler is responsible for sending commands, in the form of DataElement
trees, to the appropriate
implementer, either directly to the miner, or indirectly over the communication layer through a server
DataStore
. The update handler is responsible for notifying listeners about changes in the
DataStore
, either directly via a IDomainNotifier
or indirectly over the communication
layer through a client DataStore
.
Field Summary | |
---|---|
static String |
JARFILE_EXTENSION
|
static String |
REMOTE_CLASS_CACHE_JARFILE_NAME
|
static int |
SPIRIT_ON_INITIAL_SIZE
|
Constructor Summary | |
---|---|
DataStore(DataStoreAttributes attributes)
Creates a new DataStore instance |
|
DataStore(DataStoreAttributes attributes,
CommandHandler commandHandler,
UpdateHandler updateHandler,
IDomainNotifier domainNotifier)
Creates a new DataStore instance |
|
DataStore(DataStoreAttributes attributes,
CommandHandler commandHandler,
UpdateHandler updateHandler,
IDomainNotifier domainNotifier,
int initialSize)
Creates a new DataStore instance |
|
DataStore(DataStoreAttributes attributes,
int initialSize)
Creates a new DataStore instance |
Method Summary | |
---|---|
DataElement |
activateMiner(String minerId)
Used to load and initialize a new miner on the host |
void |
addDataStorePreferenceListener(IDataStorePreferenceListener listener)
Adds a preference change listener to the DataStore |
void |
addLoader(IExternalLoader loader)
Adds a loader for this DataStore . |
void |
addMinersLocation(DataElement location)
Tells the DataStore where to find the miners which it needs to load. |
DataElement |
addMinersLocation(String minersLocation)
Tells the DataStore where to find the miners which it needs to load. |
void |
addToRecycled(DataElement toRecycle)
|
void |
appendToFile(String remotePath,
byte[] buffer,
int size,
boolean binary)
Append a file to the specified location |
void |
appendToFile(String remotePath,
byte[] buffer,
int size,
boolean binary,
String byteStreamHandlerId)
Append a file to the specified location |
protected void |
assignCacheJar()
|
void |
cacheClass(String className,
byte[] bytes,
int size)
Saves a class to disk (caches it) so that it can be loaded by the classloader without needing to download it again |
void |
cancelAllCommands()
Tells the command handler to cancel all pending commands. |
void |
cleanBadReferences(DataElement root)
|
DataElement |
command(DataElement commandObject)
Issues a command. |
DataElement |
command(DataElement commandDescriptor,
ArrayList arguments,
DataElement dataObject)
Creates and issues a command. |
DataElement |
command(DataElement commandDescriptor,
ArrayList arguments,
DataElement dataObject,
boolean immediate)
Creates and issues a command. |
DataElement |
command(DataElement commandDescriptor,
DataElement dataObject)
Creates and issues a command. |
DataElement |
command(DataElement commandDescriptor,
DataElement dataObject,
boolean noRef)
Creates and issues a command. |
DataElement |
command(DataElement commandDescriptor,
DataElement dataObject,
boolean noRef,
boolean immediate)
Creates and issues a command. |
DataElement |
command(DataElement commandDescriptor,
DataElement arg,
DataElement dataObject)
Creates and issues a command. |
DataElement |
command(DataElement commandDescriptor,
DataElement arg,
DataElement dataObject,
boolean immediate)
Creates and issues a command. |
boolean |
contains(String id)
Checks if a DataElement with a given ID exists in the DataStore |
DataElement |
createAbstractCommandDescriptor(DataElement parent,
String name)
Creates a new abstract command descriptor DataElement |
DataElement |
createAbstractCommandDescriptor(DataElement parent,
String name,
String value)
Creates a new abstract command descriptor DataElement |
DataElement |
createAbstractCommandDescriptor(DataElement parent,
String name,
String source,
String value)
Creates a new abstract command descriptor DataElement |
DataElement |
createAbstractObjectDescriptor(DataElement parent,
String name)
Creates a new abstract object descriptor DataElement |
DataElement |
createAbstractObjectDescriptor(DataElement parent,
String name,
String source)
Creates a new abstract object descriptor DataElement |
DataElement |
createAbstractRelationDescriptor(DataElement parent,
String name)
Creates a new abstract relation descriptor DataElement |
DataElement |
createAbstractRelationDescriptor(DataElement parent,
String name,
String source)
Creates a new abstract relation descriptor DataElement |
DataElement |
createCommandDescriptor(DataElement parent,
String name)
Creates a new command descriptor DataElement |
DataElement |
createCommandDescriptor(DataElement parent,
String name,
String value)
Creates a new command descriptor DataElement |
DataElement |
createCommandDescriptor(DataElement parent,
String name,
String source,
String value)
Creates a new command descriptor DataElement |
DataElement |
createCommandDescriptor(DataElement parent,
String name,
String source,
String value,
boolean visible)
Creates a new command descriptor DataElement |
protected JarOutputStream |
createNewCacheJar(File newJar)
|
DataElement |
createObject(DataElement parent,
DataElement type,
String name)
Creates a new DataElement |
DataElement |
createObject(DataElement parent,
DataElement type,
String name,
String source)
Creates a new DataElement |
DataElement |
createObject(DataElement parent,
DataElement type,
String name,
String source,
String sugId)
Creates a new DataElement |
DataElement |
createObject(DataElement parent,
DataElement type,
String name,
String source,
String sugId,
boolean isReference)
Creates a new DataElement |
DataElement |
createObject(DataElement parent,
String[] attributes)
Creates a new DataElement . |
DataElement |
createObject(DataElement parent,
String type,
String name)
Creates a new DataElement |
DataElement |
createObject(DataElement parent,
String type,
String name,
String source)
Creates a new DataElement |
DataElement |
createObject(DataElement parent,
String type,
String name,
String source,
String sugId)
Creates a new DataElement |
DataElement |
createObject(DataElement parent,
String type,
String name,
String source,
String sugId,
boolean isReference)
Creates a new DataElement |
DataElement |
createObjectDescriptor(DataElement parent,
String name)
Creates a new object descriptor DataElement |
DataElement |
createObjectDescriptor(DataElement parent,
String name,
String source)
Creates a new object descriptor DataElement |
DataElement |
createReference(DataElement from,
DataElement to)
Creates a contents relationship between two DataElement s |
DataElement |
createReference(DataElement parent,
DataElement realObject,
DataElement relationType)
Creates a relationship between two DataElement s given a type of relationship |
DataElement |
createReference(DataElement parent,
DataElement realObject,
DataElement toRelation,
DataElement fromRelation)
Creates a two-way relationship between two elements |
DataElement |
createReference(DataElement parent,
DataElement realObject,
String relationType)
Creates a relationship between two DataElement s given a type of relationship |
DataElement |
createReference(DataElement parent,
DataElement realObject,
String relationType,
boolean doRefresh)
Creates a relationship between two DataElement s given a type of relationship |
DataElement |
createReference(DataElement parent,
DataElement realObject,
String toRelation,
String fromRelation)
Creates a two-way relationship between two elements |
void |
createReferences(DataElement from,
ArrayList to,
DataElement type)
Creates a set of relationships between one DataElement and a set of DataElement s given a type of relationship |
void |
createReferences(DataElement from,
ArrayList to,
DataElement toRel,
DataElement fromRel)
Creates a set of two-way relationship between a DataElement and a list of elements |
void |
createReferences(DataElement from,
ArrayList to,
String type)
Creates a set of relationships between one DataElement and a set of DataElement s given a type of relationship |
void |
createReferences(DataElement from,
ArrayList to,
String toRel,
String fromRel)
Creates a set of two-way relationship between a DataElement and a list of elements |
DataElement |
createRelationDescriptor(DataElement parent,
String name)
Creates a new relation descriptor DataElement |
DataElement |
createRelationDescriptor(DataElement parent,
String name,
String source)
Creates a new relation descriptor DataElement |
void |
createRoot()
Initializes the DataStore by creating the root elements |
DataElement |
createTicket(String ticketStr)
|
DataElement |
createTransientObject(String[] attributes)
|
void |
deleteObject(DataElement from,
DataElement toDelete)
Deletes an element from another element |
void |
deleteObjects(DataElement from)
Deletes all the elements contained in from |
void |
disconnectObject(DataElement toDisconnect)
Disconnects an element and makes it a "spirit" |
void |
disconnectObjects(DataElement from)
Disconnect all the elements contained in from |
void |
enableAutoRefresh(boolean flag)
|
boolean |
filter(ArrayList descriptors,
DataElement dataElement)
Indicate whether a given set of descriptors can contain the specified element |
boolean |
filter(DataElement descriptor,
DataElement dataElement)
Indicate whether a given descriptor can contain the specified element |
boolean |
filter(DataElement descriptor,
DataElement dataElement,
int depth)
Indicate whether a given descriptor can contain the specified element |
DataElement |
find(DataElement root,
int attribute,
String name)
Finds an element matching a specified attribute and name. |
DataElement |
find(DataElement root,
int attribute,
String name,
int depth)
Finds an element matching a specified attribute and name. |
DataElement |
find(String id)
Finds an element with the specified ID. |
DataElement |
findCommandDescriptor(String name)
Finds an command descriptor element with a specified name. |
List |
findDeleted(DataElement root)
Finds all the deleted elements |
List |
findDeleted(DataElement root,
int depth)
Finds all the deleted elements |
DataElement |
findDescriptor(String type,
String name)
Finds a descriptor element with a specified type and name. |
DataElement |
findMinerInformation(String minerName)
Returns the element that represents the specified miner's data. |
DataElement |
findObjectDescriptor(String name)
Finds an object descriptor element with a specified name. |
List |
findObjectsOfType(DataElement root,
DataElement type)
Finds all the elements that are of a given type from a specified element. |
List |
findObjectsOfType(DataElement root,
String type)
Finds all the elements that are of a given type from a specified element. |
DataElement |
findRelationDescriptor(String name)
Finds an relation descriptor element with a specified name. |
void |
finish()
|
void |
flush()
Delete information from the DataStore . |
void |
flush(DataElement element)
Delete information from the DataStore contained by an element. |
protected String |
generateId()
Generates a new unique ID to be used by a DataElement |
DataElement |
getAbstractedByRelation()
|
DataElement |
getAbstractsRelation()
|
String |
getAttribute(int attribute)
Returns the attribute indicated by an index. |
DataElement |
getAttributesRelation()
|
IByteConverter |
getByteConverter()
|
IByteStreamHandler |
getByteStreamHandler(String id)
|
protected String |
getCacheDirectory()
|
IClassByteStreamHandler |
getClassByteStreamHandler(String id)
|
HashMap |
getClassRequestRepository()
|
Client |
getClient()
This method is used to get the object of the Client stored for each user. |
CommandHandler |
getCommandHandler()
Returns the handler for sending commands. |
int |
getCommandWaitTime()
Returns the time the command handler waits between requests |
IDataStoreCompatibilityHandler |
getCompatibilityHandler()
Get the compatibility handler for the client. |
DataElement |
getContentsRelation()
|
IByteStreamHandler |
getDefaultByteStreamHandler()
|
IClassByteStreamHandler |
getDefaultClassByteStreamHandler()
|
DataElement |
getDescriptorRoot()
Returns the descriptor root DataElement of the DataStore . |
IDomainNotifier |
getDomainNotifier()
Returns the domain notifier. |
DataElement |
getDummy()
|
DataElement |
getExternalRoot()
|
HashMap |
getHashMap()
Returns the table of live elements in the DataStore . |
DataElement |
getHostRoot()
Returns the host root DataElement in the DataStore . |
String |
getKeyStoreLocation()
|
String |
getKeyStorePassword()
|
List |
getLastCreatedElements()
|
ArrayList |
getLoaders()
Returns the loader that is used for loading miners. |
ArrayList |
getLocalClassLoaders()
Returns registered local classloaders. |
DataElement |
getLogRoot()
Returns the log root DataElement of the DataStore . |
DataElement |
getMinerFor(DataElement commandDescriptor)
Finds the element that represents the miner that implements a particular command. |
DataElement |
getMinerRoot()
Returns the miner root DataElement in the DataStore . |
ArrayList |
getMinersLocation()
Returns the location of the miners. |
String |
getName()
Returns the name of the DataStore |
int |
getNumElements()
Returns the number of live elements in the DataStore . |
int |
getNumRecycled()
Returns the number of recycled elements in the DataStore . |
String |
getPreference(String property)
|
String |
getReferenceTag()
|
ArrayList |
getRelationItems(DataElement descriptor,
String fixateOn)
Finds all relationship descriptor types that can be applied to a particular element. |
RemoteClassLoader |
getRemoteClassLoader()
|
File |
getRemoteClassLoaderCache()
|
String |
getRemoteIP()
|
DataElement |
getRoot()
Returns the root DataElement in the DataStore . |
DataElement |
getSchema()
Used at DataStore initialization time to setup the schema |
int |
getServerIdleShutdownTimeout()
Gets the time the server may remain idle before shutting down |
int |
getServerMinor()
|
int |
getServerVersion()
|
DataElement |
getStatus()
Returns the status of the DataStore . |
DataElement |
getTempRoot()
Returns the temp root DataElement of the DataStore . |
DataElement |
getTicket()
Returns the DataStore 's ticket |
int |
getTimeoutValue()
|
UpdateHandler |
getUpdateHandler()
Returns the handler for doing updates. |
int |
getUpdateWaitTime()
Returns the time the update handler waits between requests |
String |
getUserPreferencesDirectory()
getUserPreferencesDirectory() - returns directory on IFS where to store user settings |
DataElement |
initMiners()
Used at DataStore initialization time to initialize the miners |
boolean |
isAutoRefreshOn()
|
boolean |
isConnected()
Indicates whether this DataStore is connected to it's miners or another DataStore |
boolean |
isDoSpirit()
|
boolean |
isTransient(DataElement commandObject)
Indicate whether an command is specified as transient |
boolean |
isVirtual()
Indicates whether this DataStore is virtual or not. |
boolean |
isWaiting(DataElement status)
|
void |
load(DataElement root,
String pathName)
Load a persisted DataStore tree into the specified DataElement |
static FileInputStream |
loadFile(String fileName)
|
DataElement |
localDescriptorQuery(DataElement object,
String keyName)
Find a command descriptor element in the schema with the given value. |
DataElement |
localDescriptorQuery(DataElement descriptor,
String keyName,
int depth)
Find a command descriptor element in the schema with the given value. |
boolean |
logTimes()
Indicates whether this DataStore logs the durations of commands |
String |
mapToLocalPath(String aPath)
Get the mapping from a remote path to a local path. |
void |
memLog(String str)
|
void |
modifyObject(DataElement localObject)
|
void |
moveObject(DataElement source,
DataElement target)
Moves a element from one location in the DataStore tree to another |
int |
printTree(String indent,
DataElement root)
|
int |
printTree(String indent,
int number,
DataElement root)
|
DataElement |
queryClientIP()
|
DataElement |
queryHostJVM()
|
DataElement |
queryInstall()
|
boolean |
queryServerSpiritState()
|
DataElement |
queryShowTicket(DataElement ticket)
|
void |
receiveStartSpiritCommand()
|
void |
refresh(ArrayList elements)
Refresh a set of DataElement s |
void |
refresh(DataElement element)
Refresh a DataElement |
void |
refresh(DataElement element,
boolean immediate)
Refresh a DataElement - immediately if indicated |
void |
refresh(DataElement element,
int depth,
boolean immediate)
Refresh a DataElement and its children to a certain depth - immediately if indicated |
void |
registerByteStreamHandler(IByteStreamHandler handler)
Registers a byte stream handler. |
void |
registerClassByteStreamHandler(IClassByteStreamHandler handler)
Registers a class byte stream handler. |
void |
registerLocalClassLoader(ClassLoader loader)
Registers a local class loader. |
void |
removeAllDataStorePreferenceListeners()
Removes all the preference change listeners |
void |
removeDataStorePreferenceListener(IDataStorePreferenceListener listener)
Removes a specific preference change listener from the Datastore |
void |
replaceAppendFile(String remotePath,
byte[] bytes,
int size,
boolean binary)
Transfers a file from a client to a server. |
void |
replaceAppendFile(String remotePath,
byte[] bytes,
int size,
boolean binary,
String byteStreamHandlerId)
Transfers a file from a client to a server. |
DataElement |
replaceDeleted(DataElement deletedObject)
Replaces a deleted object |
void |
replaceFile(String remotePath,
byte[] bytes,
int size,
boolean binary)
Transfers a file from a client to a server. |
void |
replaceFile(String remotePath,
byte[] bytes,
int size,
boolean binary,
String byteStreamHandlerId)
Transfers a file from a client to a server. |
void |
requestClass(String className)
On the server, sends a class request through the ServerUpdateHandler to the client. |
void |
runRemoteClassInstance(IRemoteClassInstance runnable)
|
void |
saveClass(String className,
byte[] buffer,
int size)
Saves a class to memory (but not to disk) where it can then be loaded by the RemoteClassLoaders. |
void |
saveClass(String className,
byte[] buffer,
int size,
String classbyteStreamHandlerId)
Saves a class to memory (but not to disk) where it can then be loaded by the RemoteClassLoaders. |
void |
saveClassInstance(byte[] buffer,
int size,
String classbyteStreamHandlerId)
Saves a class instance |
void |
saveFile(DataElement root,
String remotePath,
int depth)
Persist the DataStore tree from a given root |
void |
saveFile(String remotePath,
byte[] buffer,
int size,
boolean binary)
Save a file in the specified location |
void |
saveFile(String remotePath,
byte[] buffer,
int size,
boolean binary,
String byteStreamHandlerId)
Save a file in the specified location |
ArrayList |
searchForPattern(DataElement root,
ArrayList attributes,
ArrayList patterns,
boolean ignoreCase)
Find all elements from a given element that match a certain set of attributes. |
ArrayList |
searchForPattern(DataElement root,
int[] attributes,
String[] patterns,
int numAttributes,
boolean ignoreCase)
Find all elements from a given element that match a certain set of attributes. |
ArrayList |
searchForPattern(DataElement root,
int[] attributes,
String[] patterns,
int numAttributes,
boolean ignoreCase,
int depth)
Find all elements from a given element that match a certain set of attributes. |
ArrayList |
searchForPattern(DataElement root,
int[] attributes,
String[] patterns,
int numAttributes,
boolean ignoreCase,
int depth,
ArrayList searched)
Find all elements from a given element that match a certain set of attributes. |
ArrayList |
searchForPattern(DataElement root,
int attribute,
String pattern,
boolean ignoreCase)
Find all elements from a given element that match a certain attribute. |
void |
sendClass(String className)
On the server, sends a class through the ServerCommandHandler to the client. |
void |
sendKeepAliveConfirmation()
|
void |
sendKeepAliveRequest()
On the server, sends a keepalive request through the ServerUpdateHandler to the client. |
void |
setAttribute(int attribute,
String value)
Sets an attribute of the DataStore |
void |
setByteConverter(IByteConverter converter)
|
void |
setClient(Client client)
This method is used to set the Client object for each user. |
void |
setCommandHandler(CommandHandler commandHandler)
Sets the DataStore 's handler for sending commands to miners |
void |
setCommandWaitTime(int time)
Sets the time the command handler sleeps in between command requests |
void |
setCompatibilityHandler(IDataStoreCompatibilityHandler handler)
Set the compatibility handler for the client. |
void |
setConnected(boolean isConnected)
Tells the DataStore that it is connected to it's tools |
void |
setDefaultByteStreamHandler()
Sets the current ByteStreamHandler to be the default. |
void |
setDefaultByteStreamHandler(IByteStreamHandler handler)
Sets the current ByteStreamHandler to use for sending and receiving
files. |
void |
setDefaultClassByteStreamHandler()
Sets the current ClassByteStreamHandler to be the default. |
void |
setDefaultClassByteStreamHandler(IClassByteStreamHandler handler)
Sets the current ClassByteStreamHandler to use for sending and receiving
classes. |
void |
setDomainNotifier(IDomainNotifier domainNotifier)
Sets the DataStore 's IDomainNotifier |
void |
setGenerateBuffer(boolean flag)
Indicates that the datastore should transfer a DataElement's buffer attribute in the communication layer |
DataElement |
setHost(DataElement localHostObject)
Used at DataStore initialization time to indicate where to point the host root |
void |
setLoaders(ArrayList loaders)
Sets the loaders for this DataStore . |
void |
setLogTimes(boolean flag)
Tells the DataStore to log durations of commands |
void |
setObject(DataElement localObject)
Makes a given client element available on the server |
void |
setObject(DataElement localObject,
boolean noRef)
Makes a given client element available on the server |
void |
setPreference(String property,
String value)
Sets a property value preference on the client and server datastore |
void |
setPreference(String property,
String value,
boolean remoteAndLocal)
Sets a property value preference on the client datastore. |
void |
setReferenceTag(String tag)
Sets what type of attribute tag is used on the peer DataStore to indicate whether dataelements are references, values, or spirit elements. |
void |
setRemoteIP(String remoteIP)
|
void |
setServerMinor(int minor)
|
void |
setServerVersion(int version)
|
protected void |
setSpiritModeOnState()
|
void |
setSSLProperties(ISSLProperties properties)
Specifies the security properties of this DataStore. |
void |
setTicket(DataElement ticket)
Sets the ticket for this DataStore . |
void |
setTimeoutValue(int time)
Sets the maximum amount of time that the DataStore will wait to receive a response
for a synchronous command |
void |
setUpdateHandler(UpdateHandler updateHandler)
Sets the DataStore 's handler for doing updates |
void |
setUpdateWaitTime(int time)
Sets the time the update handler sleeps in between update requests |
boolean |
showTicket(String ticketStr)
Used at DataStore initialization validate access to the DataStore |
void |
startDataElementRemoverThread()
|
void |
startMemLogging()
|
void |
startTracing()
|
void |
startWaiting(DataElement status)
|
void |
stopWaiting(DataElement status)
|
DataElement |
synchronizedCommand(DataElement commandDescriptor,
ArrayList arguments,
DataElement dataObject)
Creates and issues a synchronized command. |
DataElement |
synchronizedCommand(DataElement commandDescriptor,
DataElement dataObject)
Creates and issues a synchronized command. |
DataElement |
synchronizedCommand(DataElement commandDescriptor,
DataElement dataObject,
boolean noRef)
Creates and issues a synchronized command. |
boolean |
ticketValid(DataElement ticket)
|
void |
trace(String str)
|
void |
trace(Throwable e)
|
void |
update(ArrayList objects)
|
void |
update(DataElement dataElement)
|
void |
updateAppendFile(String remotePath,
byte[] bytes,
int size,
boolean binary)
Transfers and appends a file from a server to a client. |
void |
updateAppendFile(String remotePath,
byte[] bytes,
int size,
boolean binary,
String byteStreamHandlerId)
Transfers and appends a file from a server to a client. |
void |
updateFile(String remotePath,
byte[] bytes,
int size,
boolean binary)
Transfers a file from a server to a client. |
void |
updateFile(String remotePath,
byte[] bytes,
int size,
boolean binary,
String byteStreamHandlerId)
Transfers a file from a server to a client. |
void |
updateRemoteClassInstance(IRemoteClassInstance instance,
String byteStreamHandlerId)
|
boolean |
usingSSL()
|
boolean |
validTicket()
Indicates whether a client has permission to access the DataStore |
void |
waitUntil(DataElement status,
String state)
Wait until a given status element reached the specified state. |
void |
waitUntil(DataElement status,
String state,
int timeout)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REMOTE_CLASS_CACHE_JARFILE_NAME
public static final String JARFILE_EXTENSION
public static final int SPIRIT_ON_INITIAL_SIZE
Constructor Detail |
---|
public DataStore(DataStoreAttributes attributes)
DataStore
instance
attributes
- the default attributes of the DataStore
public DataStore(DataStoreAttributes attributes, int initialSize)
attributes
- the default attributes of the DataStore
initialSize
- the initial number of preallocated DataElement
spublic DataStore(DataStoreAttributes attributes, CommandHandler commandHandler, UpdateHandler updateHandler, IDomainNotifier domainNotifier)
DataStore
instance
attributes
- the default attributes of the DataStore
commandHandler
- the DataStore's handler for sending commandsupdateHandler
- the DataStore's handler for doing updatesdomainNotifier
- the domain notifierpublic DataStore(DataStoreAttributes attributes, CommandHandler commandHandler, UpdateHandler updateHandler, IDomainNotifier domainNotifier, int initialSize)
attributes
- the default attributes of the DataStore
commandHandler
- the DataStore's handler for sending commandsupdateHandler
- the DataStore's handler for doing updatesdomainNotifier
- the domain notifierinitialSize
- the initialNumber of preallocated
DataElement
sMethod Detail |
---|
protected void setSpiritModeOnState()
public void setServerVersion(int version)
public void setServerMinor(int minor)
public int getServerVersion()
public int getServerMinor()
public void setTicket(DataElement ticket)
DataStore
. A ticket is used to prevent unauthorized users
from accessing the DataStore
ticket
- the DataElement
representing the ticketpublic void setLoaders(ArrayList loaders)
DataStore
. The loaders are used to load miners (extension tools).
loaders
- the loaders for the miners this DataStore
will be usingpublic void addLoader(IExternalLoader loader)
DataStore
. The loader is used to load miners (extension tools).
loader
- the loader for the miners this DataStore
will be usingpublic boolean usingSSL()
public void setSSLProperties(ISSLProperties properties)
properties
- the properties to setpublic String getKeyStoreLocation()
public String getKeyStorePassword()
public DataElement addMinersLocation(String minersLocation)
DataStore
where to find the miners which it needs to load.
minersLocation
- a string representing the location of the minerspublic void addMinersLocation(DataElement location)
DataStore
where to find the miners which it needs to load.
location
- a DataElement
representing the location of the minerspublic void setConnected(boolean isConnected)
DataStore
that it is connected to it's tools
isConnected
- indicates whether it is connected or notpublic void setDomainNotifier(IDomainNotifier domainNotifier)
DataStore
's IDomainNotifier
domainNotifier
- the domainNotifierpublic void setUpdateHandler(UpdateHandler updateHandler)
DataStore
's handler for doing updates
updateHandler
- the handler for doing updatespublic void setCommandHandler(CommandHandler commandHandler)
DataStore
's handler for sending commands to miners
commandHandler
- the handler for sending commands to minerspublic void setCompatibilityHandler(IDataStoreCompatibilityHandler handler)
handler
- the compatibilityHandler to usepublic IDataStoreCompatibilityHandler getCompatibilityHandler()
public void setUpdateWaitTime(int time)
time
- interval to waitpublic void setCommandWaitTime(int time)
time
- interval to waitpublic void setTimeoutValue(int time)
DataStore
will wait to receive a response
for a synchronous command
time
- interval to waitpublic int getTimeoutValue()
public int getServerIdleShutdownTimeout()
public void setAttribute(int attribute, String value)
DataStore
attribute
- index of the attribute to setvalue
- value to set the attribute at the give indexpublic void setLogTimes(boolean flag)
DataStore
to log durations of commands
flag
- whether to log times or notpublic boolean isVirtual()
DataStore
is virtual or not. A virtual DataStore
is one that does not have it's own tools, but rather communicates with a non-virtual
DataStore
that does.
DataStore
is virtual or notpublic boolean isConnected()
DataStore
is connected to it's miners or another DataStore
DataStore
is connected or notpublic boolean logTimes()
DataStore
logs the durations of commands
DataStore
logs command times or notpublic DataElement getTicket()
DataStore
's ticket
public int getUpdateWaitTime()
public int getCommandWaitTime()
public String getName()
DataStore
DataStore
public DataElement getRoot()
DataElement
in the DataStore
.
The root DataElement
has no parent and contains every DataElement
in the DataStore
through a DataElement
tree
DataElement
public DataElement getDummy()
public DataElement getHostRoot()
DataElement
in the DataStore
.
The host root DataElement
is a child of root and references
DataElement
s in the DataStore
that are related to host information
DataElement
public DataElement getExternalRoot()
public DataElement getMinerRoot()
DataElement
in the DataStore
.
The miner root DataElement
is a child of root and contains
DataElement
s the represent tools and the information that tools possess
DataElement
public DataElement getStatus()
DataStore
.
DataStore
public DataElement getLogRoot()
DataElement
of the DataStore
.
The log root contains all commands that are issued from the DataStore
public DataElement getDescriptorRoot()
DataElement
of the DataStore
.
The descriptor root contains the schema for the DataStore
and it's tools
public DataElement getTempRoot()
DataElement
of the DataStore
.
The temp root contains temporary information.
public CommandHandler getCommandHandler()
public UpdateHandler getUpdateHandler()
public ArrayList getLoaders()
public ArrayList getLocalClassLoaders()
public void registerLocalClassLoader(ClassLoader loader)
loader
,
transferred to the server, and then loaded on the server.
public DataElement getContentsRelation()
public DataElement getAttributesRelation()
public DataElement getAbstractedByRelation()
public DataElement getAbstractsRelation()
public ArrayList getMinersLocation()
public IDomainNotifier getDomainNotifier()
public String getAttribute(int attribute)
attribute
- the index of the attribute to get
public int getNumElements()
DataStore
.
public int getNumRecycled()
DataStore
.
public HashMap getHashMap()
DataStore
.
public void createRoot()
DataStore
by creating the root elements
public DataElement createReference(DataElement from, DataElement to)
DataElement
s
from
- the element that contains the otherto
- the element that is contained by the other
public DataElement createReference(DataElement parent, DataElement realObject, DataElement relationType)
DataElement
s given a type of relationship
parent
- the element that references the other elementrealObject
- the element that is referenced by the parent elementrelationType
- the descriptor element that represents the type of relationship between parent and realObject
public DataElement createReference(DataElement parent, DataElement realObject, String relationType)
DataElement
s given a type of relationship
parent
- the element that references the other elementrealObject
- the element that is referenced by the parent elementrelationType
- the string that represents the type of relationship between parent and realObject
public DataElement createReference(DataElement parent, DataElement realObject, String relationType, boolean doRefresh)
DataElement
s given a type of relationship
parent
- the element that references the other elementrealObject
- the element that is referenced by the parent elementrelationType
- the string that represents the type of relationship between parent and realObjectdoRefresh
- indicates whether or not to refresh the parent of the new reference
public void createReferences(DataElement from, ArrayList to, String type)
DataElement
and a set of DataElement
s given a type of relationship
from
- the element that references the other elementsto
- a list of elements that from referencestype
- the string that represents the type of relationships between from and topublic void createReferences(DataElement from, ArrayList to, DataElement type)
DataElement
and a set of DataElement
s given a type of relationship
from
- the element that references the other elementsto
- a list of elements that from referencestype
- the descriptor element that represents the type of relationships between from and topublic DataElement createReference(DataElement parent, DataElement realObject, DataElement toRelation, DataElement fromRelation)
parent
- an element that references the other elementrealObject
- an element that references the other elementtoRelation
- the descriptor element that represents the type of relationship between parent and realObjectfromRelation
- the descriptor element that represents the type of relationship between realObject and parent
public DataElement createReference(DataElement parent, DataElement realObject, String toRelation, String fromRelation)
parent
- an element that references the other elementrealObject
- an element that references the other elementtoRelation
- the string that represents the type of relationship between parent and realObjectfromRelation
- the string that represents the type of relationship between realObject and parent
public void createReferences(DataElement from, ArrayList to, DataElement toRel, DataElement fromRel)
DataElement
and a list of elements
from
- an element that references the other elementsto
- a list of elements that reference fromtoRel
- the descriptor element that represents the type of relationship between from and tofromRel
- the descriptor element that represents the type of relationship between to and frompublic void createReferences(DataElement from, ArrayList to, String toRel, String fromRel)
from
- an element that references the other elementsto
- a list of elements that reference fromtoRel
- the string that represents the type of relationship between from and tofromRel
- the string that represents the type of relationship between to and frompublic DataElement createTransientObject(String[] attributes)
public DataElement createObject(DataElement parent, DataElement type, String name)
DataElement
parent
- the parent of the new elementtype
- the descriptor representing the type of the new elementname
- the name of the new element
public DataElement createObject(DataElement parent, String type, String name)
DataElement
parent
- the parent of the new elementtype
- the string representing the type of the new elementname
- the name of the new element
public DataElement createObject(DataElement parent, DataElement type, String name, String source)
DataElement
parent
- the parent of the new elementtype
- the descriptor element representing the type of the new elementname
- the name of the new elementsource
- the source location of the new element
public DataElement createObject(DataElement parent, String type, String name, String source)
DataElement
parent
- the parent of the new elementtype
- the string representing the type of the new elementname
- the name of the new elementsource
- the source location of the new element
public DataElement createObject(DataElement parent, DataElement type, String name, String source, String sugId)
DataElement
parent
- the parent of the new elementtype
- the descriptor element representing the type of the new elementname
- the name of the new elementsource
- the source location of the new elementsugId
- the suggested ID for the new element
public DataElement createObject(DataElement parent, String type, String name, String source, String sugId)
DataElement
parent
- the parent of the new elementtype
- the string representing the type of the new elementname
- the name of the new elementsource
- the source location of the new elementsugId
- the suggested ID for the new element
public DataElement createObject(DataElement parent, DataElement type, String name, String source, String sugId, boolean isReference)
DataElement
parent
- the parent of the new elementtype
- the descriptor element representing the type of the new elementname
- the name of the new elementsource
- the source location of the new elementsugId
- the suggested ID for the new elementisReference
- an indication whether the new element is a reference
public DataElement createObject(DataElement parent, String type, String name, String source, String sugId, boolean isReference)
DataElement
parent
- the parent of the new elementtype
- the string representing the type of the new elementname
- the name of the new elementsource
- the source location of the new elementsugId
- the suggested ID for the new elementisReference
- an indication whether the new element is a reference
public DataElement createObject(DataElement parent, String[] attributes)
DataElement
. This is normally called on client side via xml parser
parent
- the parent of the new elementattributes
- the attributes to use in this new element
public DataElement createAbstractObjectDescriptor(DataElement parent, String name)
DataElement
parent
- the parent of the new elementname
- the name of the new element
public DataElement createAbstractObjectDescriptor(DataElement parent, String name, String source)
DataElement
parent
- the parent of the new elementname
- the name of the new elementsource
- the source location of the new element
public DataElement createObjectDescriptor(DataElement parent, String name)
DataElement
parent
- the parent of the new elementname
- the name of the new element
public DataElement createObjectDescriptor(DataElement parent, String name, String source)
DataElement
parent
- the parent of the new elementname
- the name of the new elementsource
- the name of the new element
public DataElement createAbstractRelationDescriptor(DataElement parent, String name)
DataElement
parent
- the parent of the new elementname
- the name of the new element
public DataElement createAbstractRelationDescriptor(DataElement parent, String name, String source)
DataElement
parent
- the parent of the new elementname
- the name of the new elementsource
- the source location of the new element
public DataElement createRelationDescriptor(DataElement parent, String name)
DataElement
parent
- the parent of the new elementname
- the name of the new element
public DataElement createRelationDescriptor(DataElement parent, String name, String source)
DataElement
parent
- the parent of the new elementname
- the name of the new elementsource
- the source location of the new element
public DataElement createAbstractCommandDescriptor(DataElement parent, String name)
DataElement
parent
- the parent of the new elementname
- the name of the new element
public DataElement createAbstractCommandDescriptor(DataElement parent, String name, String value)
DataElement
parent
- the parent of the new elementname
- the name of the new elementvalue
- the value used to identify the command
public DataElement createAbstractCommandDescriptor(DataElement parent, String name, String source, String value)
DataElement
parent
- the parent of the new elementname
- the name of the new elementsource
- the source location of the new elementvalue
- the value used to identify the command
public DataElement createCommandDescriptor(DataElement parent, String name)
DataElement
parent
- the parent of the new elementname
- the name of the new element
public DataElement createCommandDescriptor(DataElement parent, String name, String value)
DataElement
parent
- the parent of the new elementname
- the name of the new elementvalue
- the value used to identify the command
public DataElement createCommandDescriptor(DataElement parent, String name, String source, String value)
DataElement
parent
- the parent of the new elementname
- the name of the new elementsource
- the source location of the new elementvalue
- the value used to identify the command
public DataElement createCommandDescriptor(DataElement parent, String name, String source, String value, boolean visible)
DataElement
parent
- the parent of the new elementname
- the name of the new elementsource
- the source location of the new elementvalue
- the value used to identify the commandvisible
- indicates whether the command is visible or not
public void moveObject(DataElement source, DataElement target)
DataStore
tree to another
source
- the element to movetarget
- the element to move source topublic void deleteObjects(DataElement from)
from
- the element from which to delete objects frompublic void disconnectObjects(DataElement from)
from
- the element from which to disconnect objectspublic void deleteObject(DataElement from, DataElement toDelete)
from
- the element from which to delete an object fromtoDelete
- the element to removepublic void disconnectObject(DataElement toDisconnect)
toDisconnect
- the element to disconnectpublic DataElement replaceDeleted(DataElement deletedObject)
public boolean contains(String id)
DataElement
with a given ID exists in the DataStore
id
- the id to look for
public void refresh(ArrayList elements)
DataElement
s
elements
- a list of elements to refreshpublic void refresh(DataElement element)
DataElement
element
- an element to refreshpublic void refresh(DataElement element, boolean immediate)
DataElement
- immediately if indicated
element
- an element to refreshimmediate
- indicates to do the refresh immediatelypublic void refresh(DataElement element, int depth, boolean immediate)
DataElement
and its children to a certain depth - immediately if indicated
element
- an element to refreshdepth
- The depth to refresh the elements descendants. A depth of 0 means only the element itself
is refreshed; 1 means the element and its children are refreshed, 2 - it, its children, and its grandchildren,
etc.immediate
- indicates to do the refresh immediately. If true, the update handler will send updates
for each refreshed element in the subtree of depth depth
below the element.public void update(ArrayList objects)
public void update(DataElement dataElement)
public void updateRemoteClassInstance(IRemoteClassInstance instance, String byteStreamHandlerId)
public void updateFile(String remotePath, byte[] bytes, int size, boolean binary)
remotePath
- the path of the file on the client sidebytes
- an array of bytes representing a filesize
- the number of bytes to transferbinary
- indicates whether to send the bytes as binary or textpublic void updateFile(String remotePath, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
remotePath
- the path of the file on the client sidebytes
- an array of bytes representing a filesize
- the number of bytes to transferbinary
- indicates whether to send the bytes as binary or textbyteStreamHandlerId
- indicates the client byte stream handler to receive the bytespublic void updateAppendFile(String remotePath, byte[] bytes, int size, boolean binary)
remotePath
- the path of the file on the client sidebytes
- an array of bytes representing a filesize
- the number of bytes to transferbinary
- indicates whether to send the bytes as binary or textpublic void updateAppendFile(String remotePath, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
remotePath
- the path of the file on the client sidebytes
- an array of bytes representing a filesize
- the number of bytes to transferbinary
- indicates whether to send the bytes as binary or textbyteStreamHandlerId
- indicates the client byte stream handler to receive the bytespublic void replaceFile(String remotePath, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
remotePath
- the path of the file on the server sidebytes
- an array of bytes representing a filesize
- the number of bytes to transferbinary
- indicates whether to send the bytes as binary or textbyteStreamHandlerId
- indicates which byteStreamHandler to use to receive the bytespublic void replaceFile(String remotePath, byte[] bytes, int size, boolean binary)
remotePath
- the path of the file on the server sidebytes
- an array of bytes representing a filesize
- the number of bytes to transferbinary
- indicates whether to send the bytes as binary or textpublic void replaceAppendFile(String remotePath, byte[] bytes, int size, boolean binary, String byteStreamHandlerId)
remotePath
- the path of the file on the server sidebytes
- an array of bytes representing a filesize
- the number of bytes to transferbinary
- indicates whether to send the bytes as binary or textbyteStreamHandlerId
- indicates which byte stream handler to use to receive the bytespublic void replaceAppendFile(String remotePath, byte[] bytes, int size, boolean binary)
remotePath
- the path of the file on the server sidebytes
- an array of bytes representing a filesize
- the number of bytes to transferbinary
- indicates whether to send the bytes as binary or textpublic void setObject(DataElement localObject)
localObject
- the element to transferpublic void setObject(DataElement localObject, boolean noRef)
localObject
- the element to transfernoRef
- indicates whether the element is a reference or notpublic void modifyObject(DataElement localObject)
public DataElement setHost(DataElement localHostObject)
DataStore
initialization time to indicate where to point the host root
localHostObject
- the client host element to transfer to the server sitepublic DataElement getSchema()
DataStore
initialization time to setup the schema
public void setPreference(String property, String value)
property
- the property to setvalue
- the value of the propertypublic void setPreference(String property, String value, boolean remoteAndLocal)
property
- the property to setvalue
- the value of the propertyremoteAndLocal
- whether to propagate the change to the serverpublic String getPreference(String property)
public void addDataStorePreferenceListener(IDataStorePreferenceListener listener)
listener
- the listener to addpublic void removeDataStorePreferenceListener(IDataStorePreferenceListener listener)
listener
- the listener to removepublic void removeAllDataStorePreferenceListeners()
public DataElement activateMiner(String minerId)
minerId
- the qualified classname of the miner to load
public DataElement initMiners()
DataStore
initialization time to initialize the miners
public DataElement queryInstall()
public DataElement queryClientIP()
public boolean queryServerSpiritState()
public DataElement queryHostJVM()
public void runRemoteClassInstance(IRemoteClassInstance runnable)
public boolean showTicket(String ticketStr)
DataStore
initialization validate access to the DataStore
ticketStr
- ticket string
public boolean ticketValid(DataElement ticket)
public DataElement createTicket(String ticketStr)
public DataElement queryShowTicket(DataElement ticket)
public boolean validTicket()
DataStore
public void waitUntil(DataElement status, String state)
status
- the status elementstate
- the state to wait untilpublic boolean isWaiting(DataElement status)
public void stopWaiting(DataElement status)
public void startWaiting(DataElement status)
public void waitUntil(DataElement status, String state, int timeout)
public void cleanBadReferences(DataElement root)
public void cancelAllCommands()
public DataElement synchronizedCommand(DataElement commandDescriptor, DataElement dataObject)
commandDescriptor
- the comamnd descriptor for the commanddataObject
- the subject of the command
public DataElement synchronizedCommand(DataElement commandDescriptor, DataElement dataObject, boolean noRef)
commandDescriptor
- the comamnd descriptor for the commanddataObject
- the subject of the commandnoRef
- and indication of whether the subject should be referenced or not
public DataElement synchronizedCommand(DataElement commandDescriptor, ArrayList arguments, DataElement dataObject)
commandDescriptor
- the comamnd descriptor for the commandarguments
- the arguments for the commanddataObject
- the subject of the command
public DataElement command(DataElement commandDescriptor, ArrayList arguments, DataElement dataObject)
commandDescriptor
- the comamnd descriptor for the commandarguments
- the arguments for the commanddataObject
- the subject of the command
public DataElement command(DataElement commandDescriptor, ArrayList arguments, DataElement dataObject, boolean immediate)
commandDescriptor
- the comamnd descriptor for the commandarguments
- the arguments for the commanddataObject
- the subject of the commandimmediate
- indicates whether the command should be placed first on the request queue
public DataElement command(DataElement commandDescriptor, DataElement arg, DataElement dataObject)
commandDescriptor
- the comamnd descriptor for the commandarg
- an argument for the commanddataObject
- the subject of the command
public DataElement command(DataElement commandDescriptor, DataElement arg, DataElement dataObject, boolean immediate)
commandDescriptor
- the comamnd descriptor for the commandarg
- an argument for the commanddataObject
- the subject of the commandimmediate
- indicates whether the command should be placed first on the request queue
public DataElement command(DataElement commandDescriptor, DataElement dataObject)
commandDescriptor
- the comamnd descriptor for the commanddataObject
- the subject of the command
public DataElement command(DataElement commandDescriptor, DataElement dataObject, boolean noRef)
commandDescriptor
- the comamnd descriptor for the commanddataObject
- the subject of the commandnoRef
- an indication of whether to reference the subject or not
public DataElement command(DataElement commandDescriptor, DataElement dataObject, boolean noRef, boolean immediate)
commandDescriptor
- the comamnd descriptor for the commanddataObject
- the subject of the commandnoRef
- an indication of whether to reference the subject or notimmediate
- an indication of whether
public DataElement command(DataElement commandObject)
commandObject
- an instance of a command
public void flush()
DataStore
.
public void flush(DataElement element)
DataStore
contained by an element.
element
- the element from which to deletepublic DataElement localDescriptorQuery(DataElement object, String keyName)
object
- the object descriptor representing the type of object that can issue such a commandkeyName
- the value of the command to search for
public DataElement localDescriptorQuery(DataElement descriptor, String keyName, int depth)
descriptor
- the object descriptor representing the type of object that can issue such a commandkeyName
- the value of the command to search fordepth
- the depth of abstraction to search
public void addToRecycled(DataElement toRecycle)
public DataElement getMinerFor(DataElement commandDescriptor)
commandDescriptor
- a command descriptor
public List findObjectsOfType(DataElement root, DataElement type)
root
- where to search fromtype
- the descriptor representing the type of the objects to search for
public List findObjectsOfType(DataElement root, String type)
root
- where to search fromtype
- the descriptor representing the type of the objects to search for
public List findDeleted(DataElement root)
root
- where to search from
public List findDeleted(DataElement root, int depth)
root
- where to search fromdepth
- the depth to search
public ArrayList getRelationItems(DataElement descriptor, String fixateOn)
descriptor
- the object descriptor that uses relationshipsfixateOn
- a filter for the type of relationships to look for
public ArrayList searchForPattern(DataElement root, int attribute, String pattern, boolean ignoreCase)
root
- the element to search fromattribute
- the index of the attribute to matchpattern
- the value to compare with the attributeignoreCase
- an indication whether to ignore case for the attribute or not
public ArrayList searchForPattern(DataElement root, ArrayList attributes, ArrayList patterns, boolean ignoreCase)
root
- the element to search fromattributes
- a list of attributes to matchpatterns
- a list of values to compare with the attributesignoreCase
- an indication whether to ignore case for the attributes or not
public ArrayList searchForPattern(DataElement root, int[] attributes, String[] patterns, int numAttributes, boolean ignoreCase)
root
- the element to search fromattributes
- a list of attribute indexes to matchpatterns
- a list of values to compare with the attributesnumAttributes
- the number of attributes to matchignoreCase
- an indication whether to ignore case for the attributes or not
public ArrayList searchForPattern(DataElement root, int[] attributes, String[] patterns, int numAttributes, boolean ignoreCase, int depth)
root
- the element to search fromattributes
- a list of attribute indexes to matchpatterns
- a list of values to compare with the attributesnumAttributes
- the number of attributes to matchignoreCase
- an indication whether to ignore case for the attributes or notdepth
- how deep to search
public ArrayList searchForPattern(DataElement root, int[] attributes, String[] patterns, int numAttributes, boolean ignoreCase, int depth, ArrayList searched)
root
- the element to search fromattributes
- a list of attribute indexes to matchpatterns
- a list of values to compare with the attributesnumAttributes
- the number of attributes to matchignoreCase
- an indication whether to ignore case for the attributes or notdepth
- how deep to searchsearched
- a list of objects already searched
public DataElement findMinerInformation(String minerName)
minerName
- the qualified name of the miner
public DataElement findDescriptor(String type, String name)
type
- the type of the descriptorname
- the name of the descriptor
public DataElement findObjectDescriptor(String name)
name
- the name of the descriptor
public DataElement findRelationDescriptor(String name)
name
- the name of the descriptor
public DataElement findCommandDescriptor(String name)
name
- the name of the descriptor
public DataElement find(String id)
id
- the ID of the descriptor
public DataElement find(DataElement root, int attribute, String name)
root
- the element to search fromattribute
- the index of the attribute to comparename
- the name of the element
public DataElement find(DataElement root, int attribute, String name, int depth)
root
- the element to search fromattribute
- the index of the attribute to comparename
- the name of the elementdepth
- the depth of the search
public String mapToLocalPath(String aPath)
aPath
- the remote path
public void saveFile(DataElement root, String remotePath, int depth)
DataStore
tree from a given root
root
- the element to persist fromremotePath
- the path where the persisted file should be saveddepth
- the depth of persistence from the rootpublic void saveFile(String remotePath, byte[] buffer, int size, boolean binary)
remotePath
- the path where to save the filebuffer
- the buffer to save in the filepublic void saveFile(String remotePath, byte[] buffer, int size, boolean binary, String byteStreamHandlerId)
remotePath
- the path where to save the filebuffer
- the buffer to save in the filebyteStreamHandlerId
- indicates which byte stream handler to receive the bytespublic void saveClass(String className, byte[] buffer, int size)
className
- the fully qualified name of the classbuffer
- the contents of the classsize
- the size of the bufferpublic void saveClassInstance(byte[] buffer, int size, String classbyteStreamHandlerId)
buffer
- the contents of the classsize
- the size of the bufferclassbyteStreamHandlerId
- the id for the byte stream handlerpublic void saveClass(String className, byte[] buffer, int size, String classbyteStreamHandlerId)
className
- the fully qualified name of the classbuffer
- the contents of the classsize
- the size of the bufferclassbyteStreamHandlerId
- indicates which class byte stream handler to receive the bytespublic void appendToFile(String remotePath, byte[] buffer, int size, boolean binary)
remotePath
- the path where to save the filebuffer
- the buffer to append into the filepublic void appendToFile(String remotePath, byte[] buffer, int size, boolean binary, String byteStreamHandlerId)
remotePath
- the path where to save the filebuffer
- the buffer to append into the filebyteStreamHandlerId
- indicates which byte stream handler to receive the bytespublic void load(DataElement root, String pathName)
DataStore
tree into the specified DataElement
root
- the root element of the persisted treepathName
- the location of the persisted filepublic static FileInputStream loadFile(String fileName)
public boolean filter(DataElement descriptor, DataElement dataElement)
descriptor
- the object descriptor to testdataElement
- the object to test against
public boolean filter(DataElement descriptor, DataElement dataElement, int depth)
descriptor
- the object descriptor to testdataElement
- the object to test againstdepth
- how far to search
public boolean filter(ArrayList descriptors, DataElement dataElement)
descriptors
- the object descriptors to testdataElement
- the object to test against
public boolean isTransient(DataElement commandObject)
commandObject
- the object descriptors to test
public void enableAutoRefresh(boolean flag)
public boolean isAutoRefreshOn()
public String getUserPreferencesDirectory()
public void startDataElementRemoverThread()
public boolean isDoSpirit()
public void receiveStartSpiritCommand()
public IByteStreamHandler getDefaultByteStreamHandler()
public IClassByteStreamHandler getDefaultClassByteStreamHandler()
public IByteStreamHandler getByteStreamHandler(String id)
public IClassByteStreamHandler getClassByteStreamHandler(String id)
public void setRemoteIP(String remoteIP)
public String getRemoteIP()
public void setDefaultByteStreamHandler()
ByteStreamHandler
to be the default.
public void setDefaultClassByteStreamHandler()
ClassByteStreamHandler
to be the default.
public void setDefaultByteStreamHandler(IByteStreamHandler handler)
ByteStreamHandler
to use for sending and receiving
files.
handler
- the ByteStreamHandler
to usepublic RemoteClassLoader getRemoteClassLoader()
public void setDefaultClassByteStreamHandler(IClassByteStreamHandler handler)
ClassByteStreamHandler
to use for sending and receiving
classes.
handler
- the ClassByteStreamHandler
to usepublic void registerByteStreamHandler(IByteStreamHandler handler)
handler
- the handler to registerpublic void registerClassByteStreamHandler(IClassByteStreamHandler handler)
handler
- the handler to registerpublic void setByteConverter(IByteConverter converter)
public IByteConverter getByteConverter()
public List getLastCreatedElements()
protected String generateId()
DataElement
public void startTracing()
public void startMemLogging()
public void memLog(String str)
public void trace(String str)
public void trace(Throwable e)
public void finish()
public void requestClass(String className)
className
- The fully qualified name of the class to request.public void sendKeepAliveRequest()
public void sendClass(String className)
className
- The fully qualified name of the class to request.public HashMap getClassRequestRepository()
public void cacheClass(String className, byte[] bytes, int size)
protected JarOutputStream createNewCacheJar(File newJar) throws IOException
IOException
protected void assignCacheJar()
protected String getCacheDirectory()
public File getRemoteClassLoaderCache()
public void sendKeepAliveConfirmation()
public String getReferenceTag()
public void setReferenceTag(String tag)
public int printTree(String indent, DataElement root)
public int printTree(String indent, int number, DataElement root)
public void setGenerateBuffer(boolean flag)
flag
- true if the DataElement buffer attribute should be transferedpublic void setClient(Client client)
client
- the object of the Client classpublic Client getClient()
|
Remote System Explorer DataStore Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |