oracle.lite.mSync
was
replaced by oracle.opensync.ose
and
oracle.opensync.syncagent
. Instead of BGSyncControl
, BGSession
should be used. This class may be removed from
future release.public class BGSyncControl
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
STOP_TIMEOUT
Deprecated.
Default timeout for stopping sync agent.
|
Constructor and Description |
---|
BGSyncControl()
Deprecated.
Create an instance of BGSyncControl class.
|
BGSyncControl(java.lang.String mu)
Deprecated.
Create an instance of BGSyncControl class.
|
Modifier and Type | Method and Description |
---|---|
void |
cancelMessage()
Deprecated.
Cancel reading of messages from another thread (when called on the
same BGSyncControl object used in the read loop).
|
void |
close()
Deprecated.
Close BGSyncControl object.
|
void |
createMsgQ()
Deprecated.
Create message queue inside the BGSyncControl object to allow
receiving application messages from sync agent.
|
void |
disable()
Deprecated.
Disable sync agent.
|
void |
enable()
Deprecated.
Enable sync agent.
|
void |
finalize()
Deprecated.
|
BGSyncMsg |
getMessage()
Deprecated.
Get application message from sync agent.
|
BGSyncStatus |
getStatus()
Deprecated.
Get automatic synchronization status.
|
boolean |
isEnabled()
Deprecated.
Tells whether sync agent is enabled.
|
void |
kill()
Deprecated.
Terminate sync agent instead of stopping it gracefully.
|
void |
start()
Deprecated.
Start sync agent.
|
void |
stop()
Deprecated.
Stop sync agent.
|
void |
stop(long timeout)
Deprecated.
Stop sync agent.
|
public static final int STOP_TIMEOUT
stop
,
Constant Field Valuespublic BGSyncControl(java.lang.String mu) throws SyncException
mu
- - connection string to miniserver (if this instance
is to control automatic sync remotely) in the format host:port,
like "mymachine.oracle.com:1160". If port is omitted, default
port for miniserver (1160) will be used.
If mu is empty string or null, this instance will control
automatic sync locally (on the same machine).SyncException
- - if connection to the miniserver could not
be established or internal error occurred.public BGSyncControl() throws SyncException
SyncException
- - if internal error occurred.public void start() throws SyncException
SyncException
- - if the sync agent could not be started.public void stop(long timeout) throws SyncException
timeout
- - timeout in milliseconds to wait for sync agent
to stop gracefully.SyncException
- - if the timeout expired or internal error
occurred.public void stop() throws SyncException
SyncException
stop
public void kill() throws SyncException
SyncException
- - if the sync agent process could not be killed
due to some system conditions.public void enable() throws SyncException
SyncException
- - if the internal error occurred.public void disable() throws SyncException
SyncException
- - if the internal error occurred.public boolean isEnabled() throws SyncException
SyncException
- - if internal error occurred.public BGSyncStatus getStatus() throws SyncException
SyncException
- - if the status could not be obtained
due to internal error in sync agent.public void createMsgQ() throws SyncException
SyncExceptin
- - if internal error occurred.SyncException
public BGSyncMsg getMessage() throws SyncException
SyncException
- - if internal error occurred.public void cancelMessage()
public void close()
public void finalize()
finalize
in class java.lang.Object